You shouldn't need to care about this class (sort of). Probably the only thing you'll want to do is execute.
More...
|
|
static const std::set< Menu > & | rootMenus () |
| |
|
static void | clearRootMenus () |
| |
| static MenuItem * | addEntry (const char *menuItemPath, const char *command, bool hasCheckbox=false, bool defaultCheckBoxValue=false) |
| | add an entry to the menu More...
|
| |
| static bool | addEntry (const char *menuItemPath, const char *command, const char *optionBoxCommand) |
| | add an entry to the menu More...
|
| |
| template<typename FnPlugin > |
| static MStatus | generatePluginUI (FnPlugin &fnPlugin, const MString &prefix, const MString &extraOnInit="", const MString &extraOnExit="") |
| | generates an init and exit script that intialises the GUI on plugin load/unload (via MFnPlugin::registerUI). This method should only be called once during your plugins initializePlugin method, and that should probably be at or near the end of that function call. More...
|
| |
You shouldn't need to care about this class (sort of). Probably the only thing you'll want to do is execute.
MenuBuilder::generatePluginUI<MFnPlugin>(fnPlugin, "myplugin");
somewhere at the end of your plugins' initialize function. Any command GUI's that have previously been defined, will end up being added into the main menu.
I suppose there is absolutely no reason why you couldn't add your own menu items. All it needs is either:
That wasn't quite what I had in mind when I wrote the class, but it will work just fine. Just make sure that MenuBuilder::generatePluginUI is the last method you call in your initializePlugin method.