// v 0.0001a Light script created by Mike Fudge global proc mgfLight () { if (`window -exists "mgfLight_window"`) { deleteUI -window "mgfLight_window"; } window -title "mgfLight" "mgfLight_window"; columnLayout; text -label "GlobeLight"; frameLayout -label "Top Globe" -labelAlign "top" -borderStyle "etchedOut"; rowColumnLayout -numberOfColumns 3; // Name :: Textfield :: button text -label "Number of Lights"; intField -value 10 -minValue 1 -maxValue 100 lights; button -w 150 -label "Create" -c "toplights"; setParent ..; setParent ..; setParent ..; text -label "KeyLight"; frameLayout -label "Key" -labelAlign "top" -borderStyle "etchedOut"; rowColumnLayout -numberOfColumns 3; // Name :: Textfield :: button text -label "Number of Lights"; //Field for # of lights intField -value 1 -minValue 1 -maxValue 100 keylights; button -w 150 -label "Create" -c "keylights"; setParent ..; setParent ..; setParent ..; text -label "fillLight"; frameLayout -label "Key" -labelAlign "top" -borderStyle "etchedOut"; rowColumnLayout -numberOfColumns 3; // Name :: Textfield :: button text -label "Number of Lights"; //Field for # of lights intField -value 1 -minValue 1 -maxValue 100 fillLight; button -w 150 -label "Create" -c "fillLight"; setParent ..; setParent ..; setParent ..; text -label "Bottom Fill Light"; frameLayout -label "Key" -labelAlign "top" -borderStyle "etchedOut"; rowColumnLayout -numberOfColumns 3; // Name :: Textfield :: button text -label "Number of Lights"; //Field for # of lights intField -value 1 -minValue 1 -maxValue 100 BottomLight; button -w 150 -label "Create" -c "BottomLight"; setParent ..; setParent ..; setParent ..; columnLayout; text -label "Link to NEW camera"; button -w 150 -label "Link" -c "Camera"; // button -w 150 -label "Delete Camera" -c "delCamera"; showWindow mgfLight_window; } mgfLight(); proc toplights () //START row1 { float $numberLights = `intField -q -value lights`; float $topintensity = 1 / ($numberLights * 2); float $space = 360 / $numberLights; float $numberLightsrow2 = `intField -q -value lights`; group -em -name toplights; $c = 0; while ($c < $numberLights) { $rotDeg = $c * $space; string $toplightname =`directionalLight -intensity $topintensity`; setAttr ($toplightname + ".useDepthMapShadows") 1; move 0 0 10; group; xform -os -piv 0 0 0; rotate 0 $rotDeg 0; ungroup; parent `ls -sl` toplights; $c++; } //END row1 //START row2 { float $numberLights2 = $numberLights/1.25; //float $numberLights2 = `intField -q -value lights`; float $topintensity2 = 1 / $numberLights2; float $space2 = 360 / $numberLights2; float $numberLightsrow2 = `intField -q -value lights`; $c = 0; while ($c < $numberLights2) { $rotDeg2 = $c * $space2; string $toplightname =`directionalLight -intensity $topintensity`; setAttr ($toplightname + ".useDepthMapShadows") 1; move 0 0 10; group; xform -os -piv 0 0 0; rotate -30 $rotDeg2 0; ungroup; parent `ls -sl` toplights; $c++; } //END row2 //START row3 { float $numberLights3 = $numberLights/1.5; float $topintensity3 = 1 / $numberLights3; float $space3 = 360 / $numberLights3; float $numberLightsrow2 = `intField -q -value lights`; $c = 0; while ($c < $numberLights3) { $rotDeg3 = $c * $space3; string $toplightname =`directionalLight -intensity $topintensity`; setAttr ($toplightname + ".useDepthMapShadows") 1; move 0 0 10; group; xform -os -piv 0 0 0; rotate -60 $rotDeg3 0; ungroup; parent `ls -sl` toplights; $c++; } //END row3 } } } //End proc toplights proc keylights () { group -em -name keylights; string $keylightname =`spotLight -intensity 1`; setAttr ($keylightname + ".useDepthMapShadows") 1; setAttr ($keylightname + ".dmapFilterSize") 3; move 0 0 30; scale 5 5 5; group; xform -os -piv 0 0 0; rotate -50.387 4.899 -21.881; ungroup; parent `ls -sl` keylights; } proc fillLight() { group -em -name fillLight; string $filllightname =`spotLight -intensity 1`; setAttr ($filllightname + ".useDepthMapShadows") 1; setAttr ($filllightname + ".dmapFilterSize") 3; move 0 0 30; scale 5 5 5; group; xform -os -piv 0 0 0; rotate -137.657 -38.622 86.902; ungroup; parent `ls -sl` fillLight; } proc BottomLight() { group -em -name BottomLight; string $bottomlightname =`directionalLight -intensity .1`; setAttr ($bottomlightname + ".useDepthMapShadows") 1; setAttr ($bottomlightname + ".dmapFilterSize") 3; move 0 0 30; scale 5 5 5; group; xform -os -piv 0 0 0; rotate 63.993 12.191 14.48; ungroup; parent `ls -sl` BottomLight; } proc Camera() { // select -r LightCamera_001; // delete; CreateCameraAim; rename LightCamera_001; select -r LightCamera_001; pickWalk -d right; rename LightCamera_aim_001; select -r LightCamera_001; move 0 0 30; select -r keylights; select -add fillLight; select -add BottomLight ; parent `ls -sl` LightCamera_aim_001; lookThroughModelPanel LightCamera_001 modelPanel1; } //proc delCamera() { select -r LightCamera_001; pickWalk -d up; delete; } //proc change(string $name){ // float $color = `intSliderGrp -q -v $name`; // setAttr "bobShape.intensity" $color; // //} // //window; // columnLayout; // string $name = `intSliderGrp -label "color" -cc "change($name)"`; // showWindow; //notes //info //columnLayout //rowLayout //textField //textFieldButtonGrp //intFieldGrp