|10 October 2012||#1|
Join Date: Nov 2009
quite simple question about Class and intSlider...
Hello, I am trying to get a value from a slider in a class to use it in another class, and i want this value to change and refresh when i move my slider.
Thank you for your help.
import maya.cmds as cmds
from math import sin
cmds.window(title="RECURSION DES BOULES")
#print my slider value that changes when i move my slider
intSlider1 = cmds.intSliderGrp(field=True, label='number of recursions', minValue=1, maxValue=3)
value = cmds.intSliderGrp(intSlider1, q=True, v=True)
#query my slider value... i do not know how to...
#return my value to Window().build() button
|10 October 2012||#2|
Jr. Technical Artist
Join Date: Jul 2012
To make it change when you drag it you need to add the -changeCommand -flag and specify a procedure or command that will run when this event (change) happen.
Regarding queries on intSliders:
$var = `intSliderGrp -query -value nameOfTheIntSliderGrp`;
...should place the value of the slider into $var
Nightshade UV Editor (script for Maya) - Extends Maya's default UV Texture Editor with additional tools.
|10 October 2012||#3|
Join Date: Sep 2003
Thread automatically closed
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.
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
|Thread Closed share thread|