-
Notifications
You must be signed in to change notification settings - Fork 31
/
runMaya.py
22 lines (17 loc) · 840 Bytes
/
runMaya.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Animation DNA 2.0
# NO FTRACK EDITION
# WRAPPER to RUN MAYA and Setup Maya Environment
# Run from runMaya.bat
import os, subprocess
# Define variables
rootProject = os.path.dirname(__file__).split('PREP\PIPELINE')[0].replace("\\", "/") # Get root of project <P:/FUTURAMA/> from runMaya file
# Setup project ENVIRONMENT
os.environ['PYTHONPATH'] = '{0}PREP/PIPELINE/DNA/3D'.format(rootProject)
os.environ['MAYA_SCRIPT_PATH'] = '{0}PREP/PIPELINE/DNA/3D'.format(rootProject) # Setup MEL path to run userSetup.mel
os.environ['MAYA_SHELF_PATH'] = '{0}PREP/PIPELINE/DNA/3D/shelves'.format(rootProject)
os.environ['XBMLANGPATH'] = '{0}PREP/PIPELINE/DNA/3D/icons'.format(rootProject)
# Run MAYA
cmd = [ 'C:/Program Files/Autodesk/Maya2015/bin/maya.exe', '-hideConsole' ]
subprocess.Popen( cmd )
# Prevent closing CMD window
# raw_input()