rendered paste bodyimport maya.cmds as mc
item='selection'
def User_Select():
print"USER"
ctx=mc.scriptCtx( title='Select Something', totalSelectionSets=1,\
fcs="select -r $Selection1; python(\"Sel_Func('\"+$Selection1[0]+\"')\");",\
cumulativeLists=False, expandSelectionList=True, setNoSelectionPrompt='Select Object',\
setSelectionPrompt='Never used', setDoneSelectionPrompt='Never used because setAutoComplete is set',\
setAutoToggleSelection=True, setSelectionCount=1, setAutoComplete=True)
mc.setToolTo(ctx)
def Sel_Func(item):
print"PRINT My FUnction", item
return item