Maya module
Maya modules are self contained Maya environments. Enable easy distribution with relative paths in the module config.
create a module definition file https://help.autodesk.com/view/MAYAUL/2024/ENU/?guid=Maya_SDK_Distributing_Maya_Plug_ins_DistributingUsingModules_ModuleDescriptionFiles_html
They can:
- modify environment variables:
- custom maya plugin paths
- custom site-packages paths
- …
- vendoring assets:
Startup¶
usersetup¶
If you have a maya module, it can have its own usersetup file (mel or python) that should excute after the main ones
load / unload¶
An undocumented feature
MODULENAME_load.py runs on startup.
it bypasses checksum on startup.
you can also run a _unload ? how is this hooked up.
This was added to support the Autodesk exchange store, see Distributing plug-ins & files on Maya (and 3ds Max) - 2013
Disable modules¶
This module manager let’s you disable modules. A restart is needed, and files on your disk will be modified, which might be an issue for source controls on team projects.
Backlinks¶
- Maya plugin
- Plugins can be enabled or disabled per user, letting you toggle the startup code more easily compared to Maya modules.
- Instead, you can use a Maya module to vendor multiple Maya plugins or python packages.
- Plugins are more modular than modules
- If you package your Maya tool in a Maya module (e.g. using the Maya module template),
- Maya run on startup
- a Maya module can contain all the above solutions
- Maya module template
- Maya created controls - dev log
- But I realize I have 2 files, and a Maya plugin only supports a single Python file.
I use my Maya module template to make a new repo.
- But I realize I have 2 files, and a Maya plugin only supports a single Python file.
- plugget - create a self-installing plugin brainstorm
- This could work for unreal plugins, but Blender addons & Maya plugins aren’t in the PATH so only support a single python file. This requires a copy paste code solution, or dynamic adding to the pwath. At least maya has a workaround with Maya modules but it’d be nice to have it for plugins too.
- Maya control creator
- Maya created controls
- see Maya created controls - dev log
this is a Maya module, not just a plugin
- see Maya created controls - dev log
- Maya module sample
- a demo Maya module definition file