Skip to content

Commit cd99afe

Browse files
Improve docs: explain why the userSetup.py file was used.
1 parent 08351af commit cd99afe

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

mel/userSetup.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,22 @@
2121
2222
We use the Python 'userSetup.py' file rather than 'userSetup.mel'
2323
because of the message here:
24+
2425
https://around-the-corner.typepad.com/adn/2012/07/distributing-files-on-maya-maya-modules.html
2526
27+
.. note:
28+
29+
Another issue is that it is very common to use a userSetup.mel
30+
(.py) script to do some initialization, but Maya will load only
31+
one userSetup.mel, and the first one found in its script search
32+
path. That means any setup scripts in modules might be ignored by
33+
Maya if the user defines its own setup script, or if another
34+
module is first in the search order and have a userSetup.mel file
35+
present. Something to remember... a workaround is to use the
36+
module '/scripts/startup' folder and have your initialization code
37+
posted there, or use a userSetup.py file instead. There is other
38+
workarounds, but too complicated compare to this one.
39+
2640
"""
2741

2842
import os

0 commit comments

Comments
 (0)