Creating a menu attached to the top main menu dynamically on startup...?

   788   0   0
User Avatar
Member
1 posts
Joined: April 2015
Offline
Hi,

maybe I missed something completely…

Is there a way to dynamically create a menu attached to the top main menu?
and dynamically populate it with menu entries?

At the moment I use a python plugin to dynamically create a MainMenuCommon.xml file on startup.

Basically my python plugin scans a specific folder and creates the xml based on all found python scripts in that folder.
That way I can just add scripts/subfolders to that folder and on next startup my MainMenuCommon.xml will be automatically updated.

but is there a way to avoid to have to create/edit a xml file?
similar to ie. nuke where on startup in the menu.py file I can create a menu using python calls (menu.addMenu(), menu.addCommand(), etc)

Cheers,

Juan
  • Quick Links