On Monday, January 19, 2015 at 5:09:55 AM UTC-5, Johnny Cochrane wrote:
> Is this what you want?
> 
> import pymel.core as pm
> 
> # Name of the global variable for the Maya window
> MainMayaWindow = pm.language.melGlobals['gMainWindow'] 
> 
> # Build a menu and parent underthe Maya Window
> customMenu = pm.menu('Custom Menu', parent=MainMayaWindow)
> # Build a menu item and parent under the 'customMenu'
> pm.menuItem(label="menu item 'hihi'", command="print 'hihi'", 
> parent=customMenu)
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On 19 January 2015 at 19:34, Marcus Ottosson <konstr...@gmail.com> wrote:
> 
> +1
> 
> 
> 
> 
> -- 
> 
> You received this message because you are subscribed to the Google Groups 
> "Python Programming for Autodesk Maya" group.
> 
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to python_inside_maya+unsubscr...@googlegroups.com.
> 
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOA0zaCBF%3DEwbuE-7t%3DN3A%2B8HQ-ed8NRp97HBB2czTVKvA%40mail.gmail.com.
> 
> 
> 
> For more options, visit https://groups.google.com/d/optout.

Hi Johnny,

Do you have to run the script every time you open Maya? Is there any way you 
don't need to run any code and get the custom menu working?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/ef9be4d5-f1b9-4cf7-a24e-8c10d9e23285%40googlegroups.com.

Reply via email to