View Full Version : sliders for controllers

02 February 2011, 06:37 AM

I'm having trouble understanding how to work the sliders. I'm trying to scale the controllers that are made in my scene all in one slider, and I have had no luck. Anyone wanna help me please?


02 February 2011, 07:21 AM
Take the floatSlider for example. It has -cc and -dc flags that you can use to pass a value as an argument to a proc.

floatSlider -cc "changeProc(#1)"

could trigger a proc that changes the scale of all your controls:

global proc changeProc(float $val)
string $controls[] = {"your controls"};

for ($control in $controls)
setAttr ($control + ".scale") $val $val $val;

02 February 2011, 07:53 PM
Fantastic. I will try this later tonight. Thank you for your reply.


02 February 2011, 08:00 PM
I'd just use connectcontrol to link the values to a created slider. If you grab Vray Tuner from creative crash, it has a bunch of those. Sorry I'd copy and paste code but I'm on iPhone

edit: sorry, I just re-read your post and realized you have multiple things to control with one slider. That's best done by the process mentioned above, I think. Sorry about that

02 February 2011, 07:42 AM
@EJ. Thank you for helping me out. Works perfectly.


02 February 2011, 07:17 AM
I used this technique to scale the 'localScale' of locators. The viewports didn't show the changed size until I changed the view (ie zoom, pan).
Not sure if its my video card or the the property that I'm modifying with a slider, but for the record, if you encounter this problem, you can force the viewports to refresh with:

CGTalk Moderation
02 February 2011, 07:17 AM
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.