Hello!
I’ll try to keep this short. mGear is fantastic and I really want to include it in our production tools. I installed it in my //User/Documents/maya/2019 folder, without any issues.
Integrating it into our production tool set however is …not going great.
Some context on our project setup:
Summary
- Maya 2019.2
- mGear 3.6.0
- Windows x64
- Perforce file management
- .bat custom maya launcher, to load our tool set and env vars.
- The Maya.env file is empty; all paths are interpreted from an XML file.
- mGear is the first (and only) module we load through the XML.
- All the plug-ins and scripts paths in the XML load perfectly fine.
The problem is that I simply cannot get mGear to load. I was hoping some of you might recognize this issue, being much more familiar with modules than I am.
Below are some tests done by isolating differences between our production setup and maya default. I’ve extracted the /release/ folder directly into these two paths, so the module itself is identical in both cases.
mGear path:
-
C:/Users/Cam/Documents/maya/2019/3rdParty/mgear_3.6.0/release
-
D:/Project/External/Tools/Maya/3rdParty/mgear_3.6.0/release
Then on startup, to verify whether the paths were added, I’m using these commands (in order as “Path Query”)
getenv MAYA_MODULE_PATH;
getenv MAYA_PLUG_IN_PATH;
getenv MAYA_SCRIPT_PATH;
And the code from this post to check it’s indeed loaded as a module:
import maya.cmds as cmds
allModules = cmds.moduleInfo(listModules=True)
for eachModule in allModules:
print cmds.moduleInfo(path=True, moduleName=eachModule)
TEST CONTROL- Default Installation ( Everything Works )
Summary
Maya launcher: Default
Path added in: Maya.env file
mGear path: C:/Users/Cam/Documents/maya/2019/3rdParty/mgear_3.6.0/release
Paths Query
module path: C:/Users/Cam/Documents/maya/2019/3rdParty/mgear_3.6.0/release
plug-in path: C:/Users/Cam/Documents/maya/2019/3rdParty/mgear_3.6.0/release/platforms/2019/windows/x64
script path: C:/Users/Cam/Documents/maya/2019/3rdParty/mgear_3.6.0/release/scripts
is in module list: C:/Users/Cam/Documents/maya/2019/3rdParty/mgear_3.6.0/release/platforms/2019/windows/x64
ERRORS: None
TEST 1 - Set mGear path to external
Summary
Maya launcher: Default
Path added in: Maya.env file
mGear path: D:/Project/External/Tools/Maya/3rdParty/mgear_3.6.0/release
Paths Query
module path: D:/Project/External/Tools/Maya/3rdParty/mgear_3.6.0/release
plug-in path: D:/Project/External/Tools/Maya/3rdParty/mgear_3.6.0/release/platforms/2019/windows/x64/plug-ins
script path: D:/Project/External/Tools/Maya/3rdParty/mgear_3.6.0/release/scripts
is in module list: D:/Project/External/Tools/Maya/3rdParty/mgear_3.6.0/release/platforms/2019/windows/x64
ERRORS: file D:\Project\External\Tools\Maya\3rdParty\mgear_3.6.0\release\scripts\userSetup.py line 32: No module named shifter.menu //
TEST 2 - Custom Maya Launcher
Summary
Maya launcher: Project Custom
Path added in: Maya.env file
mGear path: C:/Users/Cam/Documents/maya/2019/3rdParty/mgear_3.6.0/release
Paths Query
module path: C:/Users/Cam/Documents/maya/2019/3rdParty/mgear_3.6.0/release
plug-in path: C:/Users/Cam/Documents/maya/2019/3rdParty/mgear_3.6.0/release/platforms/2019/windows/x64
script path: C:/Users/Cam/Documents/maya/2019/3rdParty/mgear_3.6.0/release/scripts
is in module list: C:/Users/Cam/Documents/maya/2019/3rdParty/mgear_3.6.0/release/platforms/2019/windows/x64
ERRORS: None
TEST 3 - Custom Maya Launcher AND external mGear path
Summary
Maya launcher: Project Custom
Path added in: Maya.env file
mGear path: D:/Project/External/Tools/Maya/3rdParty/mgear_3.6.0/release
Paths Query
module path: D:/Project/External/Tools/Maya/3rdParty/mgear_3.6.0/release
plug-in path: D:/Project/External/Tools/Maya/3rdParty/mgear_3.6.0/release/platforms/2019/windows/x64/plug-ins
script path: D:/Project/External/Tools/Maya/3rdParty/mgear_3.6.0/release/scripts
is in module list: D:/Project/External/Tools/Maya/3rdParty/mgear_3.6.0/release/platforms/2019/windows/x64
ERRORS: file D:\Project\External\Tools\Maya\3rdParty\mgear_3.6.0\release\scripts\userSetup.py line 32: No module named shifter.menu //
TEST 4 - Default path added through XML
Summary
Maya launcher: Project Custom
Path added in: XML
mGear path: C:/Users/Cam/Documents/maya/2019/3rdParty/mgear_3.6.0/release
Paths Query
module path: C:/Users/Cam/Documents/maya/2019/3rdParty/mgear_3.6.0/release
plug-in path: does not exist
script path: does not exist
is in module list: does not exist
ERRORS: None
TEST 5 - External path added through XML
Summary
Maya launcher: Project Custom
Path added in: XML
mGear path: D:/Project/External/Tools/Maya/3rdParty/mgear_3.6.0/release
Paths Query
module path: D:/Project/External/Tools/Maya/3rdParty/mgear_3.6.0/release
plug-in path: does not exist
script path: does not exist
is in module list: does not exist
ERRORS: None
When adding the module path through the .env file, each of these queries return the corresponding path to mGear, and it is recognized as a module.
However when using the XML method, Maya appends the given module path, but it seems like it never actually reads the .mod file. The script and plug-in paths are missing, and mGear isn’t recognized as a module.
As I understand it having a separate XML for env paths is a common practice, so I’m really surprised it works for all our plug-ins and scripts but not a module.