demdike
07-09-2007, 10:04 AM
Good day everybody,
I'm just busy figthing my way through my very first script and it's
almost finished. The one thing left is a slider I want to have in my
little window that changes a deformers envelope.
The code itself works (when I open my window, drag the slider,
highlight the code below and execute it):
float $strengthValue = `floatSliderGrp -q -value strengthSlider`;
setAttr "GridDeformer.envelope" $strengthValue ;
But I fail to use the /dragCommand/ of the /floatSliderGrp/ to execute
these two lines every time the slider becomes moved, here's the part
I'm stuck at:
/rowLayout -numberOfColumns 1 ;
floatSliderGrp -label "Strength" -field true -pre 2
-minValue 0 -maxValue 1
-dc "float $strengthValue = `floatSliderGrp -q -value strengthSlider`;
setAttr"GridDeformer.envelope" $strengthValue ;"
strengthSlider;
setParent ..;
As I earlier mentioned, I'm a newb and pretty afraid my mistake is
insanely obvious, but I'd be glad if someone could point me in the
right direction.
I'm just busy figthing my way through my very first script and it's
almost finished. The one thing left is a slider I want to have in my
little window that changes a deformers envelope.
The code itself works (when I open my window, drag the slider,
highlight the code below and execute it):
float $strengthValue = `floatSliderGrp -q -value strengthSlider`;
setAttr "GridDeformer.envelope" $strengthValue ;
But I fail to use the /dragCommand/ of the /floatSliderGrp/ to execute
these two lines every time the slider becomes moved, here's the part
I'm stuck at:
/rowLayout -numberOfColumns 1 ;
floatSliderGrp -label "Strength" -field true -pre 2
-minValue 0 -maxValue 1
-dc "float $strengthValue = `floatSliderGrp -q -value strengthSlider`;
setAttr"GridDeformer.envelope" $strengthValue ;"
strengthSlider;
setParent ..;
As I earlier mentioned, I'm a newb and pretty afraid my mistake is
insanely obvious, but I'd be glad if someone could point me in the
right direction.
