userSetup is not calling 'loadNewShelf'

106 views
Skip to first unread message

I73

unread,
Sep 30, 2016, 9:13:00 PM9/30/16
to Python Programming for Autodesk Maya
I am trying to call:
mel.eval('loadNewShelf "myPathToShelf.mel"')


But it's not loading the shelf, when I call the function after Maya has loaded in the script editor it loads the shelf fine. Where can I put my userSetup.py to allow me to load this? I know it has something to do with modules not being imported before the calls. 

Thanks! 

damon shelton

unread,
Sep 30, 2016, 9:21:33 PM9/30/16
to python_in...@googlegroups.com
Try mel.evalDeferred and see if that helps
--
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+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/e2e221ce-fb50-451c-ab9e-f8ac22018294%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I73

unread,
Oct 3, 2016, 1:17:51 PM10/3/16
to Python Programming for Autodesk Maya
Hey, thanks so much for the response. But trying this out I was unable to call it, I had to add a little bit to make it work:

cmds.evalDeferred("mel.eval('loadNewShelf \"" + shelfPath.replace('\\', '/') + "\"');")

Thanks! 
Reply all
Reply to author
Forward
0 new messages