Heya
I'm working on something similar but I get strange error. Could any have a look
at my piece of code too and let me know why I don't get call back of the value
I put in to my slider?
import maya.cmds as cmds
def AlphaValue(SliderName,AlphaName):
if cmds.ls(sl=1,mat=1):
sel=cmds.ls(sl=1,mat=1)
for alpha in sel:
value=cmds.floatSliderGrp(SliderName,query=
True,field=True)
print value
cmds.setAttr('%s.%s'%(alpha,AlphaName),value[0])
windowZ=cmds.window(title="Slider Test",w=350,h=250)
cmds.columnLayout(w=150,adj=True)
diffuseAmountSlider=cmds.floatSliderGrp(label="Zoom",
field=True,dc='AlphaValue(diffuseAmountSlider,"diffuseColorAmount")',value=1,min=-0.001,max=1,pre=3)
cmds.showWindow(windowZ)
I cant break it no matter what I try :(
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.