Update
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
# To-Do: Maya calls need to be removed for non-maya mode.
|
||||
from maya import mel
|
||||
|
||||
|
||||
def initializePythonModules():
|
||||
def _addToSysPath(pathStr, label):
|
||||
if not os.path.isdir(pathStr):
|
||||
print(
|
||||
"Error initializing MGPicker {}, as the directory does not exist: {}".format(
|
||||
label, pathStr
|
||||
)
|
||||
)
|
||||
return
|
||||
|
||||
if not sys.path.count(pathStr):
|
||||
sys.path.append(pathStr)
|
||||
|
||||
_addToSysPath(mel.eval("MGP_GetPythonAPIDir"), "python API")
|
||||
_addToSysPath(mel.eval("MGP_GetAutoLoaderDir"), "autoLoaders")
|
||||
|
||||
|
||||
initializePythonModules()
|
||||
Reference in New Issue
Block a user