Quantcast
Channel: mel wiki
Viewing all articles
Browse latest Browse all 610

Understanding MAYA_MODULE_PATH

$
0
0
Main Maya Docs
API MFnPlugin docs, under 'modules'.

Modules are a way to distribute custom plugins. They define paths to text files that specify directories where the plugins, and their dependencies live. Docs give a good overview.
A given module will udpate Maya's MAYA_SCRIPT_PATH, MAYA_PLUGIN_PATH, XBMLANGPATH, & MAYA_PLUG_IN_RESOURCE_PATH based on the info it provides.

It should be called out that Maya's term of 'module' is different from Python's: A Python module is a single .py file.

The docs (here, here) don't seem to describe this too well, but based on looking at modules, you can set one up like this:
  • /moduleRootDir< This is what you add to MAYA_MODULE_PATH
    • /icons<- any required icons go in here
    • /maya_20XX<- There is one of these directories for every version of Maya that has a compiled plugin, the name can actually be anything, it's referenced by the description file below. But for example: /maya_2016, /maya2016.5, /maya_2017, etc.
    • /scripts<- any mel & Python goes in here.
    • /presets<- any (mel?) presets go here.
Also, there needs to be a <someName>.mod text file in the /moduleRootDir that has a weird format described in the link above. Here's an example I've seen used, for a plugin compiled for two versions of Maya:
MySpecialModule.mod
+ MAYAVERSION:2015 PLATFORM:win64 MySpecialModule 1.0 maya_2015\
PATH+:=..\..\MySpecialModule\
[r] scripts: ..\scripts
[r] icons: ..\icons
[r] plug-ins: .

+ MAYAVERSION:2016 PLATFORM:win64 MySpecialModule  1.0 maya_2016\
PATH+:=..\..\MySpecialModule\
[r] scripts: ..\scripts
[r] icons: ..\icons
[r] plug-ins: .
Note the relative paths, that appear to be relative to the version-specific plugin folder listed on the first line of each section.


Viewing all articles
Browse latest Browse all 610

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>