Distribution via mod files?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm in the process of distributing a custom plugin exporter for maya 2014. There are a few gotchas associated with this that I thought would be worth sharing so here goes:
Maya looks for module files on the paths defined by the environment variable MAYA_MODULE_PATH.
The plugin description line within the mod file of the form "+ MAYAVERSION:XXXX PLATFORM:XXXXX <PLUGIN NAME> <VERSION> <PATH>"
the <path> is considered relative if it starts with an environment variable such as $(A). So assuming A is defined as "c:/" instead of looking for the plugin in "c:/" maya will look in "<directory of mod file>/c:/".
The module file can be named whatever you like (with a few exclusions the maya docs explain) so don't think you can edit the extension from .mod to ._mod or similiar to get maya to ignore your mod file. You need to completely remove the file from any location on the MAYA_MODULE_PATH.
In order to allow other plugins to be loaded you need to specify MAYA_XXXX_PATH's with "+=" so the new path is appended to the old ones.
like so: MAYA_PLUG_IN_PATH+=${YOUR_TOOLS}\\Maya\\plug-ins
Notice you can use an environment variable at the start of the path when appending to the Maya environment variables. This is because the syntax requires you to say if the path is relative or not by using ":"
If all this is correct you no longer need your Maya.env to define anything for you.
Hope this gotcha list saves someone from some of the headaches I have encountered.