global proc mrTextureSetup( ) { if ( (`window -exists mrTextureSetupname`) == true ) deleteUI mrTextureSetupname; string $window = `window -title "MR Texture Setup" -wh 400 100 mrTextureSetupname`; columnLayout -adjustableColumn true; text " "; text "________________________________________________________________"; text " Select the mentalray Texture1 on the hypershader"; text " "; textFieldGrp -label "mentalray Texture Name" namestrings; floatFieldGrp -label "Image Size Width" numberStrings; floatFieldGrp -label "Image Size Height" numberString; button -l "Rename and Assign MR Texture" -c "renameMrT"; text " "; setParent..; showWindow mrTextureSetupname; } mrTextureSetup; global proc renameMrT( ) { string $select[] = `ls -sl`; string $names = ` textFieldGrp -q -text namestrings `; string $textureFileName = "mentalrayTexture_" + $names; rename $select[0] $textureFileName; setAttr ($textureFileName + ".miWritable") 1; setAttr ($textureFileName + ".miDepth") 4; setAttr ($textureFileName + ".miLocal") 1; string $names = ` textFieldGrp -q -text namestrings `; string $pathFileName = "D:" + "misss_" +$names; setAttr -type "string" ($textureFileName + ".fileTextureName") $pathFileName; float $numbers[] = ` floatFieldGrp -q -v numberStrings `; float $number[] = ` floatFieldGrp -q -v numberString`; float $two = 2; float $wideNum = $numbers[0] * $two; setAttr ($textureFileName + ".miWidth") $wideNum; setAttr ($textureFileName + ".miHeight") $number[0]; };