//Script Name:acImagePlaneSliders //Author: Allen Curtis //Date: May 28, 2007 //Select imagePlane first in Channel Box or in // Hypergraph's Input and Output Connections. //Use sliders to position and size the imagePlane //and its image. global proc acImagePlaneSliders(){ if(`window -exists acSliders`) deleteUI acSliders; window -title "Image Plane" acSliders; string $objName[] = `ls -sl`; columnLayout; attrFieldSliderGrp -min -300.0 -max 300.0 -at ($objName[0]+".width") widthSlider; attrFieldSliderGrp -min -300.0 -max 300.0 -at ($objName[0]+".height") heightSlider; attrFieldSliderGrp -min -300.0 -max 300.0 -at ($objName[0]+".centerX") xSlider; attrFieldSliderGrp -min -300.0 -max 300.0 -at ($objName[0]+".centerY") ySlider; attrFieldSliderGrp -min -300.0 -max 300.0 -at ($objName[0]+".centerZ") zSlider; floatFieldGrp -nf 3 -l "Sliders Min/Max/Step:" -v1 -300.0 -v2 300.0 -v3 .001 -pre 6 editSlidersField; formLayout buttonFormLayout; button -label "Edit Sliders" -c "editAttrSliders" sliderButton; formLayout -edit -attachForm sliderButton "top" 5 -af sliderButton "left" 220 buttonFormLayout; window -edit -widthHeight 520 230 acSliders; showWindow; } global proc editAttrSliders(){ float $editBPMin = `floatFieldGrp -q -v1 editSlidersField`; float $editBPMax = `floatFieldGrp -q -v2 editSlidersField`; float $editStep = `floatFieldGrp -q -v3 editSlidersField`; attrFieldSliderGrp -edit -minValue $editBPMin -maxValue $editBPMax -step $editStep widthSlider; attrFieldSliderGrp -edit -minValue $editBPMin -maxValue $editBPMax -step $editStep heightSlider; attrFieldSliderGrp -edit -minValue $editBPMin -maxValue $editBPMax -step $editStep xSlider; attrFieldSliderGrp -edit -minValue $editBPMin -maxValue $editBPMax -step $editStep ySlider; attrFieldSliderGrp -edit -minValue $editBPMin -maxValue $editBPMax -step $editStep zSlider; }