trouble loading custom shelf through userSetup.py

33 views
Skip to first unread message

noahm

unread,
Feb 3, 2023, 4:16:58 PM2/3/23
to Python Programming for Autodesk Maya
I have a .bat file which sets a PYTHONPATH env variable and opens a specific maya.exe version that our team uses. Within the  PYTHONPATH  there is a userSetup.py file which runs a load shelf command within a evalDeferred function. It loads fine in a clean maya env without a lot of custom shelves and prefs but does not load if an animator has custom shelves. I've copied the animators maya prefs folder and can repro the problem but not sure what the solution is.

The expected result is that maya will load all the shelves in the user prefs and run the load shelf command in the userSetup.py I've specified.

The actual result is that only the shelves in the userPrefs.mel will load.

If I delete the userPrefs.mel the shelf loaded from userSetup.py appears.

I'm not sure the loading order or what is happening in the userPrefs to stomp any other shelves from being loaded on startup.

Any advice?

Noah
Reply all
Reply to author
Forward
0 new messages