Hi,
What is the python way of creating a new menu in the maya main menu ($gmainWindow).
I have tried the following, it works when I execute it thru the python script editor within maya. The moment it runs thru a usersetup.py it does not work. maya says "Failed to execute userSetup.py". Layout must be a menuBarLayout. How may I run this script successfully.
BRgds,
kNish
import maya.cmds as cmds
import maya.mel
maya.mel.eval('global string $gMainWindow; global string $temp =$gMainWindow;')
cmds.optionVar('defaultFileSaveType','mayaAscii')
cmds.optionVar('workingUnitLinearDefault','cm')
cmds.updoInfo(state=True,infinity=True)
showMyMenuCtrl = cmds.menu(parent=myPythonVariable, tearOff = True, label = name)
cmds.menuItem(parent=showMyMenuCtrl,label='Model')
cmds.menuItem(parent=showMyMenuCtrl,label='texture')
cmds.menuItem(parent=showMyMenuCtrl,label='Rigging')
cmds.menuItem(parent=showMyMenuCtrl,label='Render')
cmds.menuItem(parent=showMyMenuCtrl,label='Animation')