global proc windowDoStuff() { string $win = `window -t "Do Stuff" -wh 600 100`; rowColumnLayout -nc 1 -cw 1 600; string $intSlide = `intSliderGrp -l "How many?" -f 1`; // get the name of the intSlider button -l "Click" -c ("doStuff "+$intSlide); // send the name to the "doStuff" procedure showWindow $win; } proc doStuff(string $intSlide) // doStuff is expecting the name as an input as a string { polyCube -w 1 -h 1 -d 1 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1; print "HEY GUYS\n"; print ($intSlide+"\n"); int $queriedValue = `intSliderGrp -q -v $intSlide`; // get the value from the slider print ($queriedValue+"\n"); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter