Registering a Custom Menu in Softimage

 
 
 

Custom Menus in Softimage only exist as self-installing plug-ins. They are added to the list of plug-in items when Softimage loads and then get removed again once the Softimage session is done.

To successfully register your menu plug-in, use the plug-in Menu Callbacks which tell Softimage how to install your menu automatically. There is only one registration entry point (XSILoadPlugin) for the entire implementation file regardless of how many items are implemented in it.

Softimage creates one Plugin object for each implementation file based on this callback, which defines one or more PluginItem objects either using the implementation callbacks or a method on the PluginRegistrar object. In the case of a custom menu, use the RegisterMenu (PluginRegistrar) method.

The XSILoadPlugin callback takes the PluginRegistrar object as input (supplied by Softimage) which you can use to access the RegisterMenu method. This method uses the following pieces of information to register the command in Softimage:

Argument Name

What It Specifies

Anchor

Where the menu will appear (see Understanding Menu Anchor Points).

Name

The name of the menu. This becomes the name you use to identify the menu and for submenus, it is the name that appears as your submenu's anchor point (see Naming: Using Labels).

DisplayAsSubmenu

True to display the custom menu as a drop-down menu from the anchor point (see Nesting: Using SubMenus).

Dynamic

True to rebuild the menu each time its parent menu opens.

In addition, the PluginRegistrar object allows you to set some general information about the whole plug-in (that is, information that is not specific to the command plug-in item). For more information, see Self-Installing Plug-ins.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License