View Full Version : Must all Maya plug-ins be located in Maya's bin folder?
11-29-2011, 09:54 AM
I have a simple question:
Must all Maya plug-ins be located in Maya's bin folder in order to work?
Can some one give me an example of a plug-in that works outside Maya's bin folder?
12-01-2011, 06:49 PM
Check out my plugin, tradigiTOOLS:
It can be downloaded from the forums. There's no demo version and it won't work without a serial, but you can see from the installation structure that it sits outside of Maya and is still recognized.
The way we did it was to use Maya's module functionality. You make a text file that has contents like this:
//Module file for Maya. Helps Maya find resources for tradigiTOOLS.
+ tradigiTOOLS 1.30 /Applications/FUNhouse/tradigiTOOLS
Then you make a folder called 'modules' in your main Maya preferences directory. On my Mac that's:
You could probably put it inside the different version folders; I've never tried. Copy the text file into this folder as "whateveryouwant.module". Generally the whateveryouwant part should match the string after the plus sign above. So the above file is tradigiTOOLS.module.
The module itself has to have a structure similar to your preferences folder-- ie, let's say you install your module to:
Then you may also need the following sub-folders:
I generally only put in the last two, but the others can be helpful.
Now, if you're in a production environment where you want more fine-grained control I'd do a search online for environment variables and the MAYA_PLUGIN_PATH. You can man-handle this variable before starting Maya and force it to look in different places depending on show, shot, etc.
I hope this helps. Again, have a look at where the installer for my plugin puts things. This is not me soliciting you, but it *is* an example of a plugin that is commercially sold that lives outside of the Maya folder. I make modules for every plugin I try so that I can safely remove them and all their extra scripts without having to thumb through a massive folder.
12-01-2011, 09:05 PM
Plugins should be located in a folder which is included in the MAYA_PLUG_IN_PATH environment variable. To see which are those use:
if you want you can add any folder you like to that variable via the Maya.env file. Here it is documented:
Setting environment variables using Maya.env (http://download.autodesk.com/us/maya/2010help/index.html?url=Environment_Variables_Setting_environment_variables_using_Maya.env.htm,topicNumber=d0e676581)
12-01-2011, 09:19 PM
Maya modules (as described by kattkieru) are a great way of packaging plugins and associated scripts/icons. With a module definition the plug-ins scripts and icons are all properly appended to the respective Maya paths for reference.
The only downside to Maya modules is that they are APPENDED to the paths, so you can't use modules to override Maya scripts/plug-ins/icons.
If you add entries directly to the MAYA_SCRIPT_PATH or MAYA_PLUG_IN_PATH directly, those paths are PREPENDED so they can override Maya scripts/plug-ins.
That said, most of the time, I resort to using modules as I don't often override existing scripts.
12-01-2011, 09:19 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.