PDA

View Full Version : User interface slider question


PowderMonkey
09-20-2010, 08:20 AM
Hi guys,

I'm just creating a script, and am fiddling around with the user interface that I'll be making to go with it.

I've found the sliders, and have pretty much got them how I want them to look, but was wondering about how to replicate a function of some of the built in Maya sliders.

Some of the built in sliders have default minimum and maximum values, (for example, 0 to 1 for a light's intensity) but you can manually enter a value that's outside of this range and Maya automatically adjusts the slider. (so with light intensity, you could specify 10, which would become the new mid-range value, and the slider would go from 0 to about 20). This is what I want to do.

So far, playing with minimum and maximum values with slider properties in Mel limits the values to that specific range. As in the above example, entering 10 would put the slider back to its maximum value of 1.

Any suggestions?

NaughtyNathan
09-20-2010, 10:11 AM
The -max and -min flags set the default slider range. To set the max/min float value range, you use the -fmx and -fmn flags. (this is all on the floatSliderGrp command docs page btw!)
floatSliderGrp -f 1 -max 1 -min 0 -fmx 100 -fmn -100;:nathaN

PowderMonkey
09-20-2010, 01:35 PM
Funky chickens.

Thanks Nathan, that's exactly it

CGTalk Moderation
09-20-2010, 01:35 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.