PDA

View Full Version : Connecting spinner and sliders help.


shenmue
01-03-2007, 06:54 PM
Hi
Iīve been looking on maya help and the first thing is that I havenīt found a command to create a spinner.For example how can to do a script that is just about a spinner that creates spheres when it is increased.I donīt want to have to type the number.I am thinking on that for the case that I want to create twist bones in my arm.I would like to set the number of twist bones with a spinner.
oh,and if it not very much to ask,how can I connect a spinner with a slider on my UI.
Thanks.

Sick Spider
01-05-2007, 06:46 PM
shenmue, i know u got it, but maybe someone else want an answer as well :-) .

string $simpleUI = "unUsedMatDel";if (`window -exists $simpleUI`) deleteUI -window $simpleUI;
window -widthHeight 150 220 -title "SimpleUI" $simpleUI;
columnLayout -adjustableColumn 1;

rowColumnLayout -numberOfColumns 3 -columnWidth 1 80 -columnWidth 2 20 -columnWidth 3 20 ;
text -label "U ment that?";
intField -v 3 "wooHooOne";
intScrollBar -min 0 -max 10 -value 3 -horizontal false -height 20 -width 80 -changeCommand "wexlerChangeMeOne" "changeMeNowOne";
setParent..;

rowColumnLayout -numberOfColumns 1 -columnWidth 1 240;
intSliderGrp -columnAlign3 "left" "left" "left" -columnWidth3 110 20 20 -adjustableColumn3 3 -label "Wrist Twist Joints" -min 0 -max 10 -value 3 -field true "randRotation";
setParent..;

rowColumnLayout -numberOfColumns 3 -columnWidth 1 80 -columnWidth 2 20 -columnWidth 3 40;
text "Jontsblah blah blah..";
intField -v 3 "wooHooTwo";
intSlider -height 35 -min 0 -max 10 -value 3 -step 1 -horizontal false -changeCommand "wexlerChangeMeTwo" "changeMeNowTwo";
setParent..;
window -e -widthHeight 295 290 $simpleUI;
showWindow;
proc wexlerChangeMeOne()
{
int $blah = `intScrollBar -q -v "changeMeNowOne"`;
intField -e -v $blah "wooHooOne";
}
proc wexlerChangeMeTwo()
{
int $blah = `intSlider -q -v "changeMeNowTwo"`;
intField -e -v $blah "wooHooTwo";
}

Sick Spider
01-05-2007, 06:47 PM
shenmue, i know u got it, but maybe someone else want an answer as well :-) .


string $simpleUI = "unUsedMatDel";if (`window -exists $simpleUI`) deleteUI -window $simpleUI;
window -widthHeight 150 220 -title "SimpleUI" $simpleUI;
columnLayout -adjustableColumn 1;

rowColumnLayout -numberOfColumns 3 -columnWidth 1 80 -columnWidth 2 20 -columnWidth 3 20 ;
text -label "U ment that?";
intField -v 3 "wooHooOne";
intScrollBar -min 0 -max 10 -value 3 -horizontal false -height 20 -width 80 -changeCommand "wexlerChangeMeOne" "changeMeNowOne";
setParent..;

rowColumnLayout -numberOfColumns 1 -columnWidth 1 240;
intSliderGrp -columnAlign3 "left" "left" "left" -columnWidth3 110 20 20 -adjustableColumn3 3 -label "Wrist Twist Joints" -min 0 -max 10 -value 3 -field true "randRotation";
setParent..;

rowColumnLayout -numberOfColumns 3 -columnWidth 1 80 -columnWidth 2 20 -columnWidth 3 40;
text "Jontsblah blah blah..";
intField -v 3 "wooHooTwo";
intSlider -height 35 -min 0 -max 10 -value 3 -step 1 -horizontal false -changeCommand "wexlerChangeMeTwo" "changeMeNowTwo";
setParent..;
window -e -widthHeight 295 290 $simpleUI;
showWindow;
proc wexlerChangeMeOne()
{
int $blah = `intScrollBar -q -v "changeMeNowOne"`;
intField -e -v $blah "wooHooOne";
}
proc wexlerChangeMeTwo()
{
int $blah = `intSlider -q -v "changeMeNowTwo"`;
intField -e -v $blah "wooHooTwo";
}

CGTalk Moderation
01-05-2007, 06:47 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.