does anyone know if it is possible to set a default parent for top-level menus? 
 setParent() only sets the default parent for layouts and controls, and 
setParent(menu=True) won't work when passed a window.

here's some code to demonstrate my problem:

import maya.cmds as cmds
w1= cmds.window(menuBar=True,menuBarVisible=True)
# default parent is now w1
cmds.columnLayout()
cmds.text(l='window1')
cmds.menu() # this gets added to w1
w2= cmds.window(menuBar=True,menuBarVisible=True)
# default parent is now w2
cmds.columnLayout()
cmds.text(l='window2')
# set it back to w1 and add another menu
cmds.setParent(w1)
# the following line fails
cmds.menu()
cmds.showWindow(w1)
cmds.showWindow(w2)

-chad


-- 
http://groups.google.com/group/python_inside_maya

Reply via email to