Making use of Menu Objects?

Hi team,

I am building the same menu twice– once for the Nuke menu, and once for the Nodes menu. It’s a lengthy list of items to .addCommand() with, and it slows down Nuke’s boot. There must be a better way.

My thought was to build the menu once, store it, and then use it to make the second menu by passing a Menu Object to some kind of makeMenu function. Apparently there is no such function?

I wish this would work, but Menu Objects just seem to have no place as arguments in Nuke:

mainMenu ="Nuke")
subMenu = mainMenu.addMenu("Misc")
subMenu.addCommand("One", "")
subMenu.addCommand("Two", "")
subMenu.addCommand("Three", "")
nodeMenu ="Nodes")

Many thanks.

No Responses to “Making use of Menu Objects?”

Post a Comment