Menu

Object Hierarchy | Related C++ Class: Menu

Inheritance

SIObject
   UIObject
       MenuItem
          Menu

Introduced

4.0

Description

The Menu object provides the basic support for creating custom menus. With custom menus, you can:

- Build menus on demand through a callback function when the end-user opens the menu.

- Attach custom menus to a Softimage menu (sometimes called a "hosting menu"). The hosting menu can be a regular or contextual menu within a specific Softimage view.

- Create them as either a dynamic or static menu: a dynamic menu is always rebuilt each time the menu opens, whereas static menus are built once.

- Display them as either as a submenu or as a flat list of items in the hosting menu.

- Indentify anchor points indicating the of the custom menu. See siMenuAnchorPoints for a complete list.

- Make multiple views share the same custom menu. The same menu can be registered in different views with different anchor points and display options. This maximizes the code reusability of custom menus in Softimage.

Custom menus are self-installed plug-ins and are integrated in Softimage by dropping the plug-in file in the Application\Plugins folder. You cannot create a custom menu by running a script from the script editor; rather, you must implement a menu plug-in. Therefore, you must register the custom menu at startup time by using PluginRegistrar.RegisterMenu, The registration function doesn't load the custom menu explicitly in memory; Softimage will load the menu only when it is requested by the user. See Registering Plug-in Items for more details regarding implementing these kinds of self-installing items.

You must implement a callback function in order to build a menu and add menu items. The callback function is called by Softimage when the user opens the menu. The function name must be formatted as {plug-in_item_name}_Init where plug-in_item_name is the string passed to PluginRegistrar.RegisterMenu to identify the menu plug-in item. For more information, see Definition Callbacks for Menus.

Note: The function return value is not required by Softimage.

Methods

AddCallbackItem

AddCommandItem

AddItem

AddSeparatorItem

IsClassOf

IsEqualTo

 

 

Properties

Application

Callback

Categories

Command

Enabled

Filter

FullName

Help

Name

NestedObjects

Origin

OriginPath

Parent

Style

Type

 

See Also

MenuItem

Definition Callbacks for Menus

Simple Menu plug-in example

Examples

• See Menu.1.js



Autodesk Softimage 2011