You need to make your slider group intensity you are just setting the
labels. Put intensity without a flag right after the (   when you create
the slider grp
On Aug 8, 2015 10:59 AM, "Will Sharkey" <[email protected]> wrote:

> 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
> <https://groups.google.com/d/msgid/python_inside_maya/73d27d10-bb91-4285-90cb-329ba74571f8%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAM9RXoJ70Qo7QtY-A_hq%2BW2vbNyxq_%3DvwOw92Gr12eY4rePw0Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to