Thank you for your quick reply Justin Israel and sorry for my english.

I need procedure for  cmds.button(label="Remove")  
i can select objects and add to UI for be selected from there but i don't 
know how to remove if i don't need more this button for selection.

On Wednesday, February 8, 2017 at 9:25:55 PM UTC+1, Justin Israel wrote:
>
> You didn't explain your problem. What specifically is your issue?
>
> Justin
>
>
> On Thu, Feb 9, 2017 at 8:56 AM Vlade Capkun <[email protected] 
> <javascript:>> wrote:
>
>> 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] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/python_inside_maya/42bbf216-e7c5-437c-8e11-64573e449980%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/python_inside_maya/42bbf216-e7c5-437c-8e11-64573e449980%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/94cee714-f1c9-4251-a608-b996a758fd10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to