trouble loading shelves from userSetup and userPrefs

trouble loading shelves from userSetup and userPrefs

nmizrahiQDX36
Explorer Explorer
273 Views
1 Reply
Message 1 of 2

trouble loading shelves from userSetup and userPrefs

nmizrahiQDX36
Explorer
Explorer

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
0 Likes
274 Views
1 Reply
Reply (1)
Message 2 of 2

lee.dunham
Collaborator
Collaborator

Not a direct answer to your issue but I have done the same thing before using .mod file instead. It works pretty well even if the user had custom shelves.

Might be worth creating a simple .mod with some shelves and userStartup.py and adding the mod path to the `MAYA_MODULES_PATH` on startup instead. See if you still encounter the same issue.