Thank!
i dont want query for the last button....
i write a programe...it create a new menu Item(or button):
the new menuItem run a function...now the function have a argument...i
want>>>the argument=menuItem name:
example:
import maya.cmds as mc mc.window() mc.frameLayout ('ABC')
mc.button(label='create1', command="NI()") mc.showWindow() import random
def NI(): mc.setParent('ABC') mc.symbolButton(image='setKeyframe.png',
command='pass' ) mc.popupMenu(button=1 ) ind=random.randrange(1,1000)
mc.menuItem('new'+str(ind),label='new root',c='mc.polyCube(n="new")')##
new=menuItem Name thet press....<<<<<<<<<
now i want when press menuItem(example) , my program create new cube
thet...cube name is menuItem name that press....
--
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/3dca7864-bf32-4de0-9ec8-6d8a090ad704%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.