Hi there
I use this to get the Maya file menu and start populating it with various
things:
import maya.cmds as cmds
from pymel.core import menuItem,melGlobals
from maya.mel import eval as melcommand
gMainFileMenu=cmds.menu(melGlobals['$gMainFileMenu'],q=1,postMenuCommand=1)
melcommand('string $fileMenuRefreshCmd = `menu -q -postMenuCommand
$gMainFileMenu`')
melcommand('eval($fileMenuRefreshCmd)')
defaultMenuItems=cmds.menu(melGlobals['$gMainFileMenu'],q=1,ia=True)
It's embarrassing to admit, but in my defense it just works and I've been
copy pasting this example into my code for years. Finally figured to step into
modern days and figure out how to do this using a little bit friendlier
syntax...
Problem being I have no idea how to do that and am still sat with this
Frankenstein code I wrote dragging along with me.
Can someone please translate this for me into a more syntax and sharable
friendly way or point me at a good page to read up on this?
Thanks in advance.
-Ævar
--
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 post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.