Take a look at the documentation for MFnPlugin (at least Maya 8.5 docs)
You don't necessiarily want to use the MAYA_MODULE_PATH, but you can put text files into either your prefs modules directory or use Maya's installed module path. MAYA_LOCATION/modules
From an older bonustools file, [Install the current bonustools package to get the current versions, and see how the modules file is used]
create text files in the MAYA_LOCATION/modules directory for you subdirectories organized as you want
/ edit this file for your o/s by removing the slashes (//)
// from in front of the line for your o/s
//
// the basic format is:
// + bonusTools5.0 5.0 "absolute path to bonusTools5.0 directory"
// sample windows path
+ bonusTools5.0 5.0 C:Documents and SettingsksantucciMy Documentsmaya5.0onusTools5.0
// sample linux/irix path
//+ bonusTools5.0 5.0 /u/user_name/maya/5.0/linux/bonusTools5.0
Modules
Modules provide a way of informing Maya where a third party plug-in has been installed. This is the recommended way of allowing Maya to know that a plug-in is available and is important for 3rd party developers who deliver plug-ins outside of the Maya installation procedure.
The list of directories that Maya searches for modules can be accessed through the MAYA_MODULE_PATH environment variable. Please consult the online documentation for more details on this environment variable. To examine this variable value, run the following from the MEL script editor:
getenv "MAYA\_MODULE\_PATH";
The MAYA_MODULE_PATH contains a list of directories and within each module directory there are subdirectories that look like:
<PRODUCT>\<VERSION>
Within that directory are zero or more text files. Each file has a single line that looks like this:
+ <NAME> <VERSION> <PATH>
The fields are defined as:
* + add this plug-in
* NAME plug-in name ( no spaces allowed )
* VERSION plug-in version ( no spaces allowed )
* PATH plug-in path ( spaces allowed )
If we had a plug-in named doubleHelix, the single line for a Windows installation might be:
+ doubleHelix 6.0 c:\program files\DoubleHelix\
On Irix or Linux, we might have:
+ doubleHelix 6.0 /usr/local/DoubleHelix/
When Maya starts up it will search the paths defined by MAYA_MODULE_PATH. For any paths found it will do the following:
* <PATH>/scripts is appended to MAYA\_SCRIPT\_PATH
* <PATH>/plug-ins is appended to MAYA\_PLUG\_IN\_PATH
* <PATH>/icons is appended to XBMLANGPATH
* <PATH>/resources/<LANG> is appended to MAYA\_PLUG\_IN\_RESOURCE\_PATH
When the Plug-in Manager is opened it will display the plug-ins described by the module files since the appropriate paths have been modified. Following the subdirectory naming structure using "plug-ins", "scripts" and "icons" will allow Maya to find your files properly. The "resources" directory is used when maya is running in a localized language. Subdirectories of the form "resources/" can be used to provide localized plug-in resources for the corresponding language. The subdir name will correspond to the value returned by about -uiLanguage
.
NOTE: a specific module path may not exist on disk. This will not cause an error. Maya will skip over this path and continue to process the others.