State:Closed|TargetRelease:No Target|icon_bug|icon_nuke|database:public|Resolution:Not A Bug|BugID:273305|
Problem summary
Empty menus get cleared on startup after the menu.py has loaded
Customer reported version
nuke.10.0v4
Customer reported platform
fedora
Steps to reproduce
1. Copy the following into menu.py:
def move_menu(menu_name, source_menu, destination_menu, copy=False):
"""
Copies the menu item from the source_menu, to the destination_menu
with its children, then removes it from the original menu, unless set to copy.
"""
menu = source_menu.menu(menu_name)
if not menu:
print "Menu not found"
return
destination_menu.addAction(menu.action())
if not copy:
source_menu.removeItem(menu_name)
new_menu = nuke.menu('Nodes').addMenu('Test')
new_menu.addCommand('This is a command')
move_menu('Time', nuke.menu('Nodes'), new_menu) # this will fail if run from menu.py
move_menu('Draw', nuke.menu('Nodes'), nuke.menu('Nuke')) #this will work
2. Launch NukeWe're sorry to hear that
Please tell us why