PDA

View Full Version : Mel question


twidup
11-09-2002, 03:44 AM
here is part of the code for a small script I am working.

float $par2 = (1 - `getAttr $par1pnt`);

window -t ("blah "+$rev) ;
columnLayout;
text -label $test -align "center";
string $slider =`floatSlider
-min 0.0
-max 1.0
-cc ("setKeyframe $par1pnt;
setKeyframe $par2pnt;
setAttr $par2pnt $par2;")`;
connectControl $slider $par1pnt;

the itme for $par1pnt works fine, but for some reason, $par2pnt is not getting the value or keyframe. its stays at its initial value.

$par2 returns the correct value as well.

----sovled it, strange though, I tried the working solution before and it didnt work....here it is incase you were wondering:

string $slider =`floatSlider
-min 0.0
-max 1.0
-value 0.5
-cc ("refresh;
setKeyframe $par1pnt;
refresh;
setKeyframe $par2pnt;
refresh;")
-dc (" float $par1 = (`getAttr $par1pnt`);
float $par2 = (1 - $par1);
refresh;
setAttr $par2pnt $par2;")`;
connectControl $slider $par1pnt;

Thanks
-Todd

CGTalk Moderation
01-13-2006, 09:00 PM
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.