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)
[image: Inline images 1]
On 19 January 2015 at 19:34, Marcus Ottosson <[email protected]> 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 [email protected].
> 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
> <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOA0zaCBF%3DEwbuE-7t%3DN3A%2B8HQ-ed8NRp97HBB2czTVKvA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/CAJEtFuEjH155tHUXKBA014qSBA-14ODo-3N0cZbj4ktCHmyeyw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.