This commit is contained in:
2025-11-23 23:31:18 +08:00
parent d60cdc52fd
commit 9f7667a475
710 changed files with 252869 additions and 6 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()