global proc spooLights () { if (`window -exists spooLights`) deleteUI -window spooLights; window -title "Spoo Lights!" -widthHeight 200 400 -tb 1 -s 1 spooLights; columnLayout -adjustableColumn true; button -label "make all verts white" -command ("polyColorPerVertex -r 1 -g 1 -b 1 -a 1"); separator -h 10 -style "none"; button -label "prelight with shadows scale 1" -command ("preLightWithShadows1"); button -label "prelight with shadows scale 2" -command ("preLightWithShadows2"); button -label "prelight with shadows scale 3" -command ("preLightWithShadows3"); separator -h 10 -style "none"; button -label "prelight scale 1" -command ("preLight1"); button -label "prelight scale 2" -command ("preLight2"); button -label "prelight scale 3" -command ("preLight3"); separator -h 20 -style "none"; button -label "hide all lights" -command ("HideLights"); button -label "show all lights" -command ("ShowLights"); setParent ..; showWindow spooLights; lightSetupWindow; } global proc preLightWithShadows1() { toggleMaterialMapping(0); polyGeoSampler -bf -cs -ul -fs -sf 1 -su -colorBlend "overwrite" -alphaBlend "overwrite"; toggleMaterialMapping(1); } global proc preLightWithShadows2() { toggleMaterialMapping(0); polyGeoSampler -bf -cs -ul -fs -sf 2 -su -colorBlend "overwrite" -alphaBlend "overwrite"; toggleMaterialMapping(1); } global proc preLightWithShadows3() { toggleMaterialMapping(0); polyGeoSampler -bf -cs -ul -fs -sf 3 -su -colorBlend "overwrite" -alphaBlend "overwrite"; toggleMaterialMapping(1); } global proc preLight1() { toggleMaterialMapping(0); polyGeoSampler -bf -ul -fs -sf 1 -su -colorBlend "overwrite" -alphaBlend "overwrite"; toggleMaterialMapping(1); } global proc preLight2() { toggleMaterialMapping(0); polyGeoSampler -bf -ul -fs -sf 2 -su -colorBlend "overwrite" -alphaBlend "overwrite"; toggleMaterialMapping(1); } global proc preLight3() { toggleMaterialMapping(0); polyGeoSampler -bf -ul -fs -sf 3 -su -colorBlend "overwrite" -alphaBlend "overwrite"; toggleMaterialMapping(1); } ////////////////////////////////////////////////////////////////////////// // Setup Window // // // // Under Construction // // // ////////////////////////////////////////////////////////////////////////// global proc lightSetupWindow() { if( `objExists lightPositioner` ) { delete lightPositioner; } else { defaultDirectionalLight(1, 1,1,1, "0", 0,0,0); rename "directionalLight1" "shadowCaster"; setAttr "shadowCaster.translateZ" 25; setAttr "shadowCaster.translateY" 20; setAttr "shadowCaster.rotateX" -38; setAttr "shadowCasterShape.useDepthMapShadows" on; //setAttr "shadowCaster.penumbraAngle" 3; setAttr "shadowCasterShape.intensity" 1.5; setAttr "shadowCasterShape.color" -type double3 0.916 0.99279 1 ; defaultDirectionalLight(1, 1,1,1, "0", 0,0,0); rename "directionalLight1" "directLight"; setAttr "directLight.translateX" 15.669; setAttr "directLight.translateY" 20; setAttr "directLight.translateZ" -19.394; setAttr "directLight.rotateX" 155; setAttr "directLight.rotateY" 35; setAttr "directLight.rotateZ" 180; setAttr "directLightShape.intensity" 1; setAttr "directLightShape.color" -type double3 1 0.90055 0.779 ; defaultPointLight(0.5, 1,1,1, 0, 0, 0,0,0, 1); rename "pointLight1" "fillLight"; setAttr "fillLight.translateX" -21.774; setAttr "fillLight.translateY" 20; setAttr "fillLight.translateZ" -12.12; setAttr "fillLightShape.intensity" 1; setAttr "fillLightShape.color" -type double3 0.99724 1 0.909 ; circle -c 0 0 0 -nr 0 1 0 -sw 360 -r 1 -d 3 -ut 0 -tol 0.01 -s 8 -ch 1; rename "nurbsCircle1" "lightPositioner"; setAttr "lightPositioner.translateY" 20; setAttr "lightPositioner.scaleX" 25; setAttr "lightPositioner.scaleY" 25; setAttr "lightPositioner.scaleZ" 25; select -r fillLight ; select -tgl directLight ; select -tgl shadowCaster ; select -tgl lightPositioner ; parent; connectAttr -f lightPositioner.scaleZ lightPositioner.scaleY; connectAttr -f lightPositioner.scaleZ lightPositioner.scaleX; string $winName = "lightRadius"; if (`window -exists $winName`) { deleteUI $winName; } window -t "Modify Light Rig Position" -wh 400 100 lightRadius; columnLayout -cw 200; attrFieldSliderGrp -l "Increase Coverage" -min 0 -max 2000 -at ("lightPositioner.scaleZ") theScaleZ; attrFieldSliderGrp -l "Raise Lights" -min 0 -max 500 -at ("lightPositioner.ty") thePosY; attrFieldSliderGrp -l "Rotate Lights" -min 0 -max 360 -at ("lightPositioner.rotateY") theRotateY; showWindow lightRadius; } }