The Maya Developer Kit is available online at Autodesk Exchange at https://apps.exchange.autodesk.com/MAYA/en/Home/Index. After you copy your archive to your $Home directory and unarchive it, a folder called devkitBase is created. There are a number of example plug-ins located in devkitBase/devkit/plug-ins. The Developer Kit also contains several Maya API applications, located in devkitBase/devkit/applications. Copy the /devkit and /mkspecs folders into /usr/autodesk/maya2018.
Your should therefore have the following folder structure:
Before you can use these plug-ins, you need to build them.
Define the MAYA_LOCATION environment variable to point to the directory where Maya is installed. If your command-line shell is sh, bash or ksh then the commands would be as follows:
export MAYA_LOCATION=/usr/autodesk/maya2018
If you don't want to have to reset MAYA_LOCATION each time you log in, then add those commands to your $HOME/.profile as well.
If your command-line shell is csh or tcsh then command would be:
setenv MAYA_LOCATION /usr/autodesk/maya2018
and you can also add it to your $HOME/.cshrc to avoid having to reset it each time you log in.
Create a local plug-in directory ($HOME/devkit/plug-ins) and copy the Developer Kit resources to your local directory. This step is necessary because you likely won't have write permissions on the directories where Maya's Developer Kit is installed.
mkdir -p $HOME/devkit/plug-ins cd $HOME/devkit/plug-ins cp -r $MAYA_LOCATION/devkit/plug-ins/* .
make clean make
mkdir plug-ins scripts icons
cp */*.so plug-ins cp */*.{mel,py} scripts cp */*.{png,xpm,cur,rgb} icons
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.
Set your Maya.env file to use the common directories:
MAYA_PLUG_IN_PATH = $HOME/devkit/plug-ins/plug-ins MAYA_SCRIPT_PATH = $HOME/devkit/plug-ins/scripts XBMLANGPATH = $HOME/devkit/plug-ins/icons/%B
Now when you start up Maya and bring up the Plug-in Manager you'll see all of the Developer Kit plug-ins, listed within a common section.
MAYA_PLUG_IN_PATH = $HOME/devkit/plug-ins/circleNode:$HOME/devkit/plug-ins/whatisCmd MAYA_SCRIPT_PATH = $HOME/devkit/plug-ins/circleNode:$HOME/devkit/plug-ins/whatisCmd XBMLANGPATH = $HOME/devkit/plug-ins/circleNode/%B:$HOME/devkit/plug-ins/whatisCmd/%B
If you now start Maya and open the Plug-in Manager window, you should see the circleNode and whatisCmd plug-ins each listed within its own section.
To build the supplied stand-alone application examples, you need to do the following:
Create a local plug-in directory ($HOME/devkit/plug-ins) and copy the Developer Kit resources to your local directory.
mkdir -p $HOME/devkit/applications cd $HOME/devkit/applications cp -r $MAYA_LOCATION/devkit/applications/* . make clean make
Use the shell script mayald to link Maya API applications. When linking your own plug-ins, make sure to provide the mayald command with a 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.