How can I make a mel script slider dynamic/automaticlly update object
changes tia sal2
Greetings all I have a working mel script below but it will only update
the changes if I press the button how can I make it so if I move the
slider the object changes in realtime without having to press a button
TIA
sal2
if (`window -exists myWindow`) { deleteUI -window myWindow; }
window -rtf true -title "Deform torus" myWindow;
columnLayout;
floatSliderGrp -minValue 3.14 -maxValue 3.90 -label "Positive Value" -
field true posDef;
floatSliderGrp -minValue 3.14 -maxValue 6.28 -label "Negative Value" -
field true NegDef;
button -c "findValues" -label "Make'm";
showWindow myWindow;
proc findValues () {
float $myNumPosDef = `floatSliderGrp -q -value "posDef"`;
float $myNumNegDef = `floatSliderGrp -q -value "NegDef"`;
print $myNumPosDef;
print $myNumNegDef;
setAttr "pos_Cyl_bend1.curvature" $myNumPosDef;
setAttr "neg_Cyl_bend2.curvature" $myNumNegDef;
}