got it, thanks for the help. On Sat, Aug 8, 2015 at 2:04 PM, damon shelton <[email protected]> wrote:
> 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 a topic in the > Google Groups "Python Programming for Autodesk Maya" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/python_inside_maya/Br1xainAOw8/unsubscribe > . > To unsubscribe from this group and all its topics, 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 > <https://groups.google.com/d/msgid/python_inside_maya/CAM9RXoJ70Qo7QtY-A_hq%2BW2vbNyxq_%3DvwOw92Gr12eY4rePw0Q%40mail.gmail.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/CAF4oo%2BCnqejs2KVf6MT2AdobyFu0sK6hFL0g_FQkyDGb3%3Dcz4A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
