View Full Version : Help on UI organisation

06 June 2003, 07:14 PM
How to make the button command $cmd??

window -t "vertexNoise" noiseVertexWindow;
columnLayout; //Layout
floatSliderGrp -label "X Amplitude" -field true -value 0 -maxValue 10 xAmplitude;
floatSliderGrp -label "Y Amplitude" -field true -value 0 -maxValue 10 yAmplitude;
floatSliderGrp -label "Z Amplitude" -field true -value 0 -maxValue 10 zAmplitude;
separator -style "single";
button -l "Ok" -c "eval $cmd";
showWindow noiseVertexWindow;

//Query values
float $xAmplitude = `floatSliderGrp -q -value xAmplitude`;
float $yAmplitude = `floatSliderGrp -q -value yAmplitude`;
float $zAmplitude = `floatSliderGrp -q -value zAmplitude`;

string $cmd = `print ($xAmplitude + $yAmplitude + $zAmplitude)`;


06 June 2003, 08:58 PM
Any particular reason you couldn't use this:
button -l "OK" -c "print ($xAmplitude + " " + $yAmplitude + " " + $zAmplitude)";
I mean, does it have to use a dynamic command? Because otherwise I'm sure it'd be easier to just put what you want in the -c parameter, alternatively create a procedure...

My 2 cents!

CGTalk Moderation
01 January 2006, 12: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.