//A simplistic script to view models with transparency for image modeling //Keith Legg August 4th 2001 //select the surface in hypershade etc, to toggle transparency //rock on proc vmaster() { global float $trans = 0; global float $val = .9; global string $sgnam = ""; global string $sg2nam = ""; global string $sg3nam = ""; global int $frameState = 0; if (`window -ex "cmon"`) deleteUI "cmon"; window -widthHeight 200 100 -title "SEE_MONSTER_KEITH_LEGG_AUGUST_2001" "cmon"; columnLayout -adjustableColumn true; button -label "CLOSE" -command "deleteUI cmon"; button -label "WIRE SURFACE 1" -command ("toglr ($val)"); button -label "SHADE SURFACE 1" -command ("toglr (0)"); button -label "SELECT" -command ("select $sgnam;ShowAttributeEditorOrChannelBox;"); button -label "WIRE SURFACE 2" -command ("toglr2 ($val)"); button -label "SHADE SURFACE 2" -command ("toglr2 (0)"); button -label "SELECT" -command ("select $sg2nam;ShowAttributeEditorOrChannelBox;"); button -label "WIRE SURFACE 3" -command ("toglr3 ($val)"); button -label "SHADE SRFACE 3" -command ("toglr3 (0)"); button -label "SELECT" -command ("select $sg3nam;ShowAttributeEditorOrChannelBox;"); button -label "QUERY SURFACE 1" -command ("qsg"); button -label "QUERY MATERIAL 2" -command ("qsg2"); button -label "QUERY MATERIAL 3" -command ("qsg3"); checkBox -label "EP TOGGL" -onc "toggle -editPoint;" -ofc "toggle -editPoint;"; checkBox -label "VRTX TOG" -onc "ToggleVertices;" -ofc "ToggleVertices;"; checkBox -label "WIRE1" -onc " modelEditor -e -wos 1 modelPanel1;" -ofc " modelEditor -e -wos 0 modelPanel1;"; checkBox -label "WIRE2" -onc " modelEditor -e -wos 1 modelPanel4;" -ofc " modelEditor -e -wos 0 modelPanel4;"; checkBox -label "WIRE3" -onc " modelEditor -e -wos 1 modelPanel3;" -ofc " modelEditor -e -wos 0 modelPanel3;"; checkBox -label "WIRE4" -onc " modelEditor -e -wos 1 modelPanel2;" -ofc " modelEditor -e -wos 0 modelPanel2;"; checkBox -label "GRID1" -v 1 -onc "modelEditor -e -grid 1 modelPanel1" -ofc "modelEditor -e -grid 0 modelPanel1"; checkBox -label "GRID2" -v 1 -onc "modelEditor -e -grid 1 modelPanel4" -ofc "modelEditor -e -grid 0 modelPanel4"; checkBox -label "GRID3" -v 1 -onc "modelEditor -e -grid 1 modelPanel3" -ofc "modelEditor -e -grid 0 modelPanel3"; checkBox -label "GRID4" -v 1 -onc "modelEditor -e -grid 1 modelPanel2" -ofc "modelEditor -e -grid 0 modelPanel2"; checkBox -label "FRAME" -v 0 -onc "$frameState = 1" -ofc "$frameState = 0"; checkBox -label "180_FRONT" -onc "topFlip 3 front 180" -ofc "topFlip 3 front 0"; checkBox -label "180_TOP" -onc "topFlip 2 top 180" -ofc "topFlip 2 top 0"; checkBox -label "180_SIDE" -onc "topFlip 1 side 180" -ofc "topFlip 1 side 0"; button -label "RESET" -command "rst"; button -label "NUMSEL" -command ("count"); button -label "POSX" -command "posx"; button -label "NEGX" -command "negx"; button -label "POSY" -command "posy"; button -label "NEGY" -command "negy"; button -label "POSZ" -command "posz"; button -label "NEGZ" -command "negz"; attrFieldSliderGrp -min 0 -max 12000000 -at"perspShape.farClipPlane"; attrFieldSliderGrp -l "fine tune" -step .1 -min 0 -max 500 -at"perspShape.farClipPlane"; attrFieldSliderGrp -l "TOP RY" -step .1 -min 0 -max 360 -at"top.ry"; attrFieldSliderGrp -l "SIDE RX" -step .1 -min 0 -max 360 -at"side.rx"; attrFieldSliderGrp -l "FRONT RZ" -step .1 -min 0 -max 360 -at"front.rz"; showWindow cmon; } proc negx () { setAttr "side.rotateY" -90; setAttr "side.translateX" -150; } proc posx () { setAttr "side.rotateY" 90; setAttr "side.translateX" 150; } proc negz () { setAttr "front.translateZ" -150; setAttr "front.rotateY" 180; } proc posz () { setAttr "front.translateZ" 150; setAttr "front.rotateY" 0; } proc posy () { setAttr "top.translateY" 150; setAttr "top.rotateX" -90; } proc negy () { setAttr "top.translateY" -150; setAttr "top.rotateX" 90; } proc toglr (float $pass) { string $temp = ""; global string $sgnam; string $temp = "setAttr " + $sgnam + ".transparency " + "-type double3 "+ $pass+ " " + $pass + " " + $pass; eval ($temp); } proc toglr2 (float $pass) { string $temp = ""; global string $sg2nam; string $temp = "setAttr " + $sg2nam + ".transparency " + "-type double3 "+ $pass+ " " + $pass + " " + $pass; eval ($temp); } proc toglr3 (float $pass) { string $temp = ""; global string $sg3nam; string $temp = "setAttr " + $sg3nam + ".transparency " + "-type double3 "+ $pass+ " " + $pass + " " + $pass; eval ($temp); } proc qsg() { string $temp[] = `ls -sl`; global string $sgnam; $sgnam = $temp[0]; print $sgnam; } qsg; proc qsg2() { string $temp[] = `ls -sl`; global string $sg2nam; $sg2nam = $temp[0]; print $sg2nam; } proc qsg3() { string $temp[] = `ls -sl`; global string $sg3nam; $sg3nam = $temp[0]; print $sg3nam; } proc count() { string $temp[] = `ls -sl`; int $num = size($temp); print $num; } proc topFlip (int $sel,string $cam,float $val) { global int $frameState; string $list[] = `ls -sl`; string $current = $list[0]; string $temp = $current; select $cam; //move 0 0 0; rotate 0 0 0; if ($sel== 1) {rotate $val -90 0;setAttr side.ry -90;} if ($sel== 2) {rotate 0 $val 0;setAttr top.rx -90;} if ($sel== 3) {rotate 0 0 $val;} select $temp; if ($frameState == 1) {FrameSelected;fitPanel -selected;} } proc rst () { select top; move 0 100 0; rotate -90 0 0; select side; move 100 0 0; rotate 0 90 0; select front; move 0 0 100; rotate 0 0 0; select persp; move 28 21 28; rotate -27.93 45 0; } vmaster;