Last active
May 11, 2016 19:29
-
-
Save theodox/e0a27e310014cc62a656 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
This is the default UndeadLabs maya UserSetup.py. It should be copied into | |
one of the user's MAYA_SCRIPT_DIR folders (typically, the one for the | |
current version, like '2014x64', but it works in the generic one as well) | |
''' | |
import os | |
import site | |
import sys | |
ZIP_NAME = os.environ.get('MAYA_ZIP', 'ulmaya.zip') | |
def _startup_(_globals): | |
tools_root = os.environ.get('MAYA_DEV', False) | |
if tools_root: | |
site.addsitedir(os.path.expandvars(tools_root)) | |
else: | |
script_dirs = os.environ['maya_script_path'].split(";") | |
for dir in script_dirs: | |
tools_root = dir.strip() + os.path.sep + ZIP_NAME | |
if os.path.exists(tools_root): | |
site.addsitedir(tools_root) | |
break | |
import ul.bootstrap as bootstrap | |
bootstrap.bootstrap(_globals) | |
if __name__ == "__main__": | |
_startup_(globals()) | |
del _startup_ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment