Hi i am trying to disable the Open,Save & SaveAs items from File Menu and 
icons on Status Line.

I am able to disable the file menu items by below code.

import maya.cmds as mc 

mc.menuItem('openProject',e=1,en=0)

mc.menuItem('saveItem',e=1,en=0)

mc.menuItem('saveAsItem',e=1,en=0)


but i want it to run at maya start-up (may be something like UserSetup.py)


The problem is the above code is not working after launching maya.


it gives errors as below


import maya.cmds as mc

mc.menuItem('openProject',e=1,en=0)

# Error: RuntimeError: menuItem: Object 'openProject' not found. # 

mc.menuItem('saveItem',e=1,en=0)

# Error: RuntimeError: menuItem: Object 'saveItem' not found. # 

mc.menuItem('saveAsItem',e=1,en=0)

# Error: RuntimeError: menuItem: Object 'saveAsItem' not found. # 


but if i click the file menu once and use the commands, then it will work 
perfectly.

So how can i make this to work at maya launch/startup.


There is no chance of editing the maya files form installation path. as it 
has to be implemented all over my studio.

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to