Menu¶
-
class
source.Maya.custom_marking_menu.Menu(menu_name, fct)¶ build or rebuild marking menu.
Example:
import Maya.custom_marking_menu as cstm_menu tool_menu = cstm_menu.Menu('my_menu_name', menu_build_fct)
See also
Check the cmds documentation to see how to build your marking menu items.
And this article on the subject where the code come from.
- Parameters
menu_name (str) – name that you will give the menu
fct (method) – function that will add the item to the menu
Functions
Creates the marking menu context and calls the buildMarkingMenu() method to populate it with all items.
Menu.buildMarkingMenu(menu, parent)This is where all the elements of the marking menu our built.
Checks if there is a marking menu with the given name and if so deletes it to prepare for creating a new one