Interfaces > Core Interfaces > menuMan |
The MenuMan Core Interface provides access to the Menu Manager and allows the user to create new and access existing menus and QuadMenus and their sub-menus and menu items as well as load, save, register and unregister them.
For details and examples of using this interface, see also the topic Menu Manager
This method allows you to load a menu file from disk and automatically update the UI accordingly. Returns true if the menu file was loaded, otherwise false .
<string>file: The path and filename of the menu file to load.
This method allows you to save a menu file to disk. Returns true if the menu file was saved, otherwise false .
<string>file: The path and filename of the menu file to save.
This method returns the file name of the currently loaded and active menu file.
This method will return a pointer to a menu based on its name. Returns a menu MixinInterface to the menu or undefined if the menu was not found.
<string>menuName: The name of the menu to return.
This method will return a pointer to a quad menu based on its name. Returns a quadMenu MixinInterface to the quad menu or undefined if the menu was not found.
Returns the total number of menus in registered with the menu manager.
Returns the total number of quad menus registered with the menu manager.
Retrieves the indexed menu in the menu manager. This is a 1-based index. Returns a menu MixinInterface.
Retrieves the indexed quad menu in the menu manager. This is a 1-based index. Returns a quadMenu MixinInterface.
This method creates a new, empty menu with the given name and returns a menu MixinInterface.
<Interface>menuMan.createQuadMenu <string>name <string>quad1Name <string>quad2Name <string>quad3Name <string>quad4Name
This method creates a new, empty quad menu. It contains 4 empty menus, one for each quad. Returns a quadMenu MixinInterface.
This method creates a new sub-menu item that can be added to a menu. It uses the given "name" and it displays the given sub-menu. Returns a MenuItem MixinInterface.
This creates a new menu separator that can be added to a menu. Returns a MenuItem MixinInterface.
This method creates a new menu item that can be added to a menu. The item is an action that executes the macro script with the given name and category. Returns a MenuItem MixinInterface when successful, or "undefined" if there is no macroScript with the given name and category.
category default value: undefined
This method creates a new menu item from an action and returns a menu MixinInterface.
<boolean>menuMan.setViewportRightClickMenu <enum>which <Interface>menu which enums: {#nonePressed | #shiftPressed | #altPressed | #controlPressed | #shiftAndAltPressed | #shiftAndControlPressed | #controlAndAltPressed | #shiftAndAltAndControlPressed}
This method method allows you to set the viewport right-click menu to the specified quad menu. Returns true if it was set successfully.
<enum>which : See the List of Right-Click Contexts above.
<Interface>menu: A pointer to the quad menu you wish to set.
<Interface>menuMan.getViewportRightClickMenu <enum>which which enums: {#nonePressed | #shiftPressed | #altPressed | #controlPressed | #shiftAndAltPressed | #shiftAndControlPressed | #controlAndAltPressed | #shiftAndAltAndControlPressed}
This method returns a quadMenu MixinInterface to the current viewport right-click quad menu.
This method returns a menu MixinInterface to the main menu bar.
This method allows you to set the main menu bar. Returns true if it was set successfully.
<Interface>menu: A menu MixinInterface to the menu you wish to set as the main menu bar.
This method checks if the "Show All Quads" flag is set for a specific QuadMenu. This method will return true if the flag is set or false if the flag is not set.
<Interface>quadMenu: A quadMenu MixinInterface to the QuadMenu you wish to check the flag for.
This method sets the "Show All Quads" flag for a specific QuadMenu.
<Interface>quadMenu : A quadMenu MixinInterface to the QuadMenu you wish to set the flag for.
<bool>value: True to set the flag to on, false to set the flag off.
This method returns the name given to a specific QuadMenu as a string.
<Interface>quadMenu: A quadMenu MixinInterface to the QuadMenu for which you wish to retrieve the name.
This method allows you to set the name of a specific QuadMenu.
<Interface>quadMenu : A quadMenu MixinInterface to the QuadMenu for which you wish to set the name.
<string>name: The string containing the name for the QuadMenu.
This method can be called to update 3ds Max’ main menu bar after adding sub-menu’s or menu items.
To add items to 3ds Max’s main menu, the plug-in should check the return value of RegisterMenuContext() , and if it is true , that means that this is the first time it has been registered, and the plug-in can then create new menus, add items to 3ds Max’s main menu and Quad menus.
This method allows you to remove a menu form the mananger. Returns false if the menu was not registered, true if successfully unregistered.
<Interface>menu: Points to the menu to unregister.
The menu [Mixin Interface] is returned by several methods described earlier on this page.
Sets the menu title to the supplied string.
Returns the number of menu items.
Returns a menuItem MixinInterface to the indexed menu item.
Adds a new menu item to the menu at the specified position.
Removes the indexed menu item.
The quadMenu [Mixin Interface] is returned by several methods described earlier on this page.
Returns a menu MixinInterface to the indexed menu (1 to 4).
The menuItem [Mixin Interface] is returned by several methods described earlier on this page.
Sets the menu item title to the supplied string.
When true is supplied, forces the menu item to show the custom title.
Returns true if custom title is enabled, false otherwise.
When true is supplied, forces the menu item to be displayed as flat.
Returns true if the menu item is set to display as flat.
Returns true if the menu item is a separator.
Returns a menu MixinInterface to the sub-menu.