Skip to content

Instantly share code, notes, and snippets.

@Roumenov
Last active March 5, 2020 09:12
Show Gist options
  • Save Roumenov/f41107245a8db96f106eaf3202f4cee8 to your computer and use it in GitHub Desktop.
Save Roumenov/f41107245a8db96f106eaf3202f4cee8 to your computer and use it in GitHub Desktop.
simple proc for making a custom menu in maya
import maya.cmds as mc
main_window = pm.language.melGlobals['gMainWindow']
menus = mc.window(main_window, query=True, menuArray=True)
if menu_name in menus:
mc.deleteUI(menu_name, menu=True)
mc.menu(menu_name,
parent=main_window,
label="Foo",
tearOff=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment