Installing a Maya plug-in

The following instructions are common for all of the Linux, Windows, and Mac OS X platforms.

  1. In your plug-in directory, create 3 folders: plug-ins, scripts, and icons.

    Place your plug-in files in the /plug-ins folder.

    If your plug-in contains scripts, place your scripts files in the /scripts folder.

    If your plug-in contains icons, place your icon files in the /icons folder.

    IMPORTANT:Copying your plug-in files to your Maya installation directory is not recommended because it may corrupt the installation of Maya.
  2. Define the following environment variables in a file called Maya.env:
    • MAYA_PLUG_IN_PATH - directory to search for plug-ins. Set this to your /plug-ins folder.
    • MAYA_SCRIPT_PATH - directory to search for MEL and Python scripts. Set this to your /scripts folder.
    • XBMLANGPATH - directory to search for icons. Set this to your /icons folder.
    TIP:You can place your plug-in directory in any path you like (with the exception of the Maya installation directory), as long as each of the plug-ins, scripts and icons folders are correctly pointed to by their respective environment variables.

    For more information about the Maya.env file, including the location to which it should be saved on each platform, see Setting environment variables using Maya.env. Using Maya.env makes it easy to set up the same runtime environment on another system by simply copying the file. You can still set explicit values for these variables on the command line and they are prepended to the values given in Maya.env.

  3. In Maya, select Window > Settings/Preferences > Plug-in Manager to open the Plug-in Manager. Your plug-in will appear in the list. Select Loaded to load your plug-in.
TIP:

As an alternative to setting environment variables to point to the plug-in's files, you can instead copy your plug-in/scripts/icons files to the directories pointed to by Maya by default. The easiest way to see what those directories are is to use the getenv command from within Maya's Script Editor. For example,

getenv MAYA_PLUG_IN_PATH

As a third option, you can also use click the Browse button in the Plug-in Manager to navigate to your plug-in.

NOTE:

The environment variable, MAYA_APP_DIR, can be used to help find the Maya.env file. If this variable is not set, Maya looks in this directory:

  • (Linux)$HOME/maya
  • (Mac OS X) $HOME/Library/Preferences/Autodesk/maya
  • (Windows) \Users\<username>\Documents\maya

In addition, if you have multiple versions of Maya installed on your system, you can put your Maya.env file in a versioned subdirectory of either the directory pointed to by the MAYA_APP_DIR environment variable or this directory:

  • (Linux)$HOME/maya
  • (Mac OS X) $HOME/Library/Preferences/Autodesk/maya
  • (Windows) \Users\<username>\Documents\maya

For example, if you set MAYA_APP_DIR to be /usr/mydir, you can create a Maya.env file in the directory /usr/mydir/<version> that will only be used when the specified version of Maya is run (for example, a directory /usr/mydir/2017 for Maya 2017). If you do not set MAYA_APP_DIR, you can put your version-specific Maya.env file in the following:

  • (Linux)$HOME/maya/<version>
  • (Mac OS X)$HOME/Library/Preferences/Autodesk/maya/<version>
  • (Windows) \Users\<username>\Documents\maya\<version>

Related topics

For information regarding building plug-ins, see:

For information regarding distributing Maya plug-ins and modules, see: