PDA

View Full Version : intSliderGrp question


gurdjieff
12-16-2004, 06:52 PM
Hello,
I am trying to get the correct syntax for
creating a connection between an intSliderGrp
value and an objects attribute (in this case scale)
so far I have...

global proc scaleWin()

{

window -title "scaleSlider";
columnLayout
-adjustableColumn true;

intSliderGrp -label "scale" -field true
-minValue 0 -maxValue 20
-fieldMinValue 0 -fieldMaxValue 20
-value 1;
showWindow;




string $scaleField = `intSliderGrp`;

string $sphereScaled[] = `sphere`;

setAttr ($sphereScaled[0] + ".scale") $scaleField;

}


thanks in advance!

failure
12-16-2004, 08:09 PM
Use attrFieldSliderGrp instead. It will link automatically to the specified attribute.

Remark: using integer slider for scaling is not a good idea since scaling is always expressed as a floating point value.

CGTalk Moderation
01-20-2006, 04:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.