Created
December 7, 2015 17:05
-
-
Save ben-hearn-sb/4e398b683d0e30db924c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def addMenuItem(parentMenu=None, labelName='', callback=None, sub=False, tearable=False): | |
if callback == None: | |
newMenu = pm.menuItem(parent=parentMenu, label=labelName, subMenu=sub, tearOff=tearable) | |
return newMenu | |
else: | |
pm.menuItem(p=parentMenu, label=labelName, command=pm.Callback(callback)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment