Hi, I have some simple code that I'm trying to return the value for a
floatSliderGrp but Im not sure why is failing. Any pointers for what Im
doing wrong?
import maya.cmds as cmds
def intensity_value(*args):
selection = cmds.ls( selection=True )
intValue = cmds.floatSliderGrp('Intensity', query=True, value=True)
for sel in selection:
cmds.setAttr('{0}.intensity'.format(sel),intValue)
def exposure_value(*args):
selection = cmds.ls( selection=True )
expoValue = cmds.floatSliderGrp('Exposure', query=True, value=True)
for sel in selection:
cmds.setAttr('{0}.aiExposure'.format(sel),expoValue)
def myWindow():
if cmds.window('ws_lightParameter', exists = True):
cmds.deleteUI('ws_lightParameter')
cmds.window('ws_lightParameter')
cmds.columnLayout()
cmds.floatSliderGrp(label='Intensity', field=True, maxValue=50.0,
value=0, cc= intensity_value)
cmds.floatSliderGrp(label='Exposure', field=True, maxValue=50.0,
value=0, cc= exposure_value)
cmds.showWindow('ws_lightParameter')
myWindow()
thanks!
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/73d27d10-bb91-4285-90cb-329ba74571f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.