global proc cullCamlistBuilder() { deleteUI "cameraMenuBuiltcull"; string $persCameraList[] = `listCameras -p`; string $camerasInMenu = ""; for($cam in $persCameraList) { menuItem -l $cam $cam; } //attach first camera: attacher; } global proc attacher() { string $cammer = `optionMenuGrp -q -v perspCamMenuCull`; connectControl cullslider1 ($cammer + ".nearClipPlane"); } global proc cullinator() { //The GUI if ( `window -exists cullinatorUI` ) deleteUI -window cullinatorUI; string $cullinatorUI = `window -sizeable 1 -title "The Cullinator" cullinatorUI`; columnLayout -adjustableColumn true -columnAttach "both" 8; columnLayout; separator -style "none" -w 240 -h 12; text "Pick perspective camera:"; separator -style "none" -h 3; columnLayout; optionMenuGrp -width 200 perspCamMenuCull; menuItem -label "camera" cameraMenuBuiltcull; setParent ..; columnLayout; floatSliderGrp -precision 2 -field 1 -min 0.01 -max 1000.00 cullslider1; separator -style "none" -h 3; button -w 240 -h 30 -l "Attach camera's near cull to slider" -c "attacher"; separator -style "none" -h 3; setParent ..; separator -style "none" -w 240 -h 12; showWindow $cullinatorUI; cullCamlistBuilder; } cullinator;