![]()
Linux environments ( 32-bit and 64-bit )
Maya plug-ins
The Maya Development Kit product contains a number of example plug-ins located in
/usr/autodesk/maya/devkit/plug-ins. In a 32-bit installation, the/usr/autodesk/mayadirectory will be, by default, a symbolic link to/usr/autodesk/maya8.5.On a 64-bit installation, the/usr/autodesk/mayadirectory will be, by default, a symbolic link to/usr/autodesk/maya8.5-x64.Before you can use these plug-ins, you need to build them. You must first create a working directory, recursively copy the directory, and run make. For example,
Also, to attach your plug-in development area to the rest of Maya, you need to set a number of variables. These are:
MAYA_LOCATIONMAYA_SCRIPT_PATHMAYA_PLUG_IN_PATHXBMLANGPATHThese variables can be defined in a file called Maya.env. Maya lets you define these variables in a file so that you can easily set up the same runtime environment on another system by simply copying the file. You can still use variables in the environment and they will either override the corresponding variable in the Maya.env file or be prepended to the variable for variables which represent search paths.
The environment variable,
MAYA_APP_DIR, can be used to help find theMaya.envfile. If this variable is not set, Maya looks in your$HOME/mayadirectory. In addition, if you have multiple versions of Maya installed on your system, you can put yourMaya.envfile in a subdirectory of either the directory pointed to by theMAYA_APP_DIRenvironment variable or$HOME/maya.Name the subdirectory to be the version number of the Maya application that is executed. For example, if you set
MAYA_APP_DIRto be/usr/mydir, you can create a version specificMaya.envfile in the directory/usr/mydir/8.5that will be used when the 8.5 version of Maya is run. If you do not setMAYA_APP_DIR, you can put your version 8.5 tailoredMaya.envfile in$HOME/maya/8.5.The following assumes that Maya is installed in
/usr/autodesk/mayaand that you have set up your plug-in development area in$HOME/devkit/plug-ins. If your installation is different, you will have to modify the lines that setMAYA_LOCATIONin the examples below.Your Maya.env file should contain the following:
MAYA_SCRIPT_PATH = $HOME/devkit/plug-ins MAYA_PLUG_IN_PATH = $HOME/devkit/plug-ins XBMLANGPATH = $HOME/devkit/plug-ins/%BUsers of
/bin/shor/bin/kshneed to add the following lines to$HOME/.profile.Users of
/bin/cshor/bin/tcshneed to add the following lines to$HOME/.cshrc.If you now start Maya and open the Plug-in Manager window, you should see a list of all the pre-compiled plug-ins you copied to your
$HOME/devkit/plug-insdirectory.Maya API applications
To build the supplied stand-alone application examples, you need to do the following:
mkdir $HOME/devkit/applications cd $HOME/devkit/applications cp /usr/autodesk/maya/devkit/applications/* . make Clean makeImportant note
The shell script
mayaldis used to link these applications to isolate you from the exact set of Maya shared libraries necessary for the link.On Linux, the variable you must set is
LD_LIBRARY_PATHso that the shared libraries can be found at run time.The recommended procedure to prepare for building and running stand-alone apps is to set the following environment variables:
Linux:
When linking your plug-in, make sure to list all of the OpenMaya libraries containing the API classes you have used. The reference pages for each class specify the particular OpenMaya library containing the class.