Go to: Synopsis. Return value. Keywords. Python examples.

Synopsis

setMenuMode([string])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

setMenuMode is NOT undoable, NOT queryable, and NOT editable.

Optionally sets a new Menu Mode for the menu bar in the main Maya window. Returns the current Menu Mode, and if a new one is specified, then the previous Menu Mode is returned. Note that due to recent changes to the menu set architecture (8.0+), this function now takes a menu set as a parameter instead of a label.

Return value

stringThe current Menu Mode for the menu bar in the main Maya window.

Keywords

menu, menus, menubar

Python examples

import maya.cmds as cmds

# Use the "Rendering" Menu Set, and at the same time get the one currently used.
prevMenuMode = cmds.setMenuMode('renderingMenuSet')

# Print the current Menu Set: "renderingMenuSet".
print( cmds.setMenuMode() )