Here is my code:

import maya.cmds as cmds
from functools import partial

selList = cmds.ls(sl=True)

window = cmds.window( title="Picker", widthHeight=(200, 55) )
lay = cmds.columnLayout( adjustableColumn=True )

cmds.button(label='Add Controls', command='addBtn()')

def doSelect(objSel, *args):
cmds.select(objSel, replace=True)
print objSel 
for obj in selList:
cmds.rowLayout(numberOfColumns=3, columnWidth3=(80, 75, 150), 
adjustableColumn=True, parent=lay)
cmds.button(label=obj, command=partial(doSelect, obj))
cmds.button(label="Remove")
def addBtn():
addSel = cmds.ls(sl=True)
for obj in addSel:
cmds.rowLayout(numberOfColumns=3, columnWidth3=(80, 75, 150), 
adjustableColumn=True, parent=lay)
cmds.button(label=obj, command=partial(doSelect, obj))
cmds.button(label="Remove") 
cmds.showWindow( window )


-- 
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/42bbf216-e7c5-437c-8e11-64573e449980%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to