This commit is contained in:
2025-11-30 14:49:16 +08:00
parent 021c593241
commit de46c4b073
1406 changed files with 526774 additions and 1221 deletions

View File

@@ -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()