Im suprised no love of melscript in a graphics forum?
Anyways hope someone can help me…
Im trying to get the user to input a float in the user infterface. Im haveing trouble getting
that value (from the user) so i can use it (example scale an object).
Here are some of the things Ive tried.
// this one you can see what im trying to do (but the string to float doesnt work)////////
string $Winname = window -title "Creating Objects" -menuBar true -widthHeight 450 200;
columnLayout;
global float $fltX = 1.0;
string $myFloatFieldGrp = floatFieldGrp -label "X";
floatFieldGrp -q -value $myFloatFieldGrp;
$fltX = $myFloatFieldGrp;
button -label “Set Scale” -command “scale -r $fltX 1 1”;
showWindow $Winname;
/////////////////////////////////////////////////////////////////////////////////////////
// a few more try’s////////////////
global float $fltX;
$fltX = `floatFieldGrp -label "X" -value1 test`; // <- problem child
// i have also tried getting the value from "test"
// i guessing floatFieldGrp only returns boolean
button -label "Set Scale" -command "scale -r $fltX 1 1";
// here is another i tried
floatFieldGrp -label "X" -value1 1.1 test;
float $test = `floatfieldGrp -q -float float(test)`;
// and another trial
string $myFloatFieldGrp = `floatFieldGrp -label "mudda"`;
floatFieldGrp -q -value $myFloatFieldGrp;
print($myFloatFieldGrp);
$fltX = float($myFloatFieldGrp);