mel global vars

55 views
Skip to first unread message

Todd Widup

unread,
Oct 21, 2015, 1:51:33 PM10/21/15
to python_in...@googlegroups.com
does pyMel store/add the maya global vars anyplace? 
globals like $gShelfForm or $gShelfTopLevel, etc

--
Todd Widup
Creature TD / Technical Artist
to...@toddwidup.com
todd....@gmail.com
www.toddwidup.com

Robert White

unread,
Oct 21, 2015, 2:05:53 PM10/21/15
to Python Programming for Autodesk Maya
Should be the melGlobals object.
It works like a dict

So this should work

import pymel.core as pm
pm
.melGlobals['$gShelfTopLevel']
# Result: 'MayaWindow|toolBar2|MainShelfLayout|formLayout14|ShelfLayout' #

Todd Widup

unread,
Oct 21, 2015, 2:42:47 PM10/21/15
to python_in...@googlegroups.com
cool, thanks Robert. 

I was using the whole pm.eval trick for it and thought there has to be a smoother way


--
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_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/b7d728a6-24d2-409f-8042-98f53a1ce442%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages