Logo
latest
  • Installation

How to use:

  • Sculpt Anim
  • Reference Manager

Python

  • Maya
    • misc_tools
    • custom_marking_menu
      • Menu
        • Menu.build
        • Menu.buildMarkingMenu
        • Menu.removeOld
      • sculpt_anim
  • Qt
  • Sculpt_anim
  • Reference_manager
Hugo Potin tool
  • »
  • Maya »
  • custom_marking_menu »
  • Menu
  • Edit on GitHub

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

Menu.build()

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.

Menu.removeOld()

Checks if there is a marking menu with the given name and if so deletes it to prepare for creating a new one

Next Previous

© Copyright 2021, Hugo potin. Theme based on Godot dark theme. Revision 142a84ea.

Built with Sphinx using a theme provided by Read the Docs.