Windows environment (64-bit)

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 C:\Users\<name> and unzip 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 C:\Program Files\Autodesk\maya2017.

Your should therefore have the following folder structure:

For instructions on setting up your build environment for the Mac OS X or Linux platforms, see:

NOTE:

To compile your custom plug-ins, you can also find the C++ API header files and libraries in the following folders of your Maya installation:

  • Header files: ..\include\maya
  • Libraries: ..\lib

Compiler requirement

To compile plug-ins and standalone applications on Windows, use Visual Studio 2012 Update 4.

NOTE:

Maya does not provide binary compatibility for plug-ins between releases. For example a plug-in built in Maya 2015 will not load in Maya 2016. With each new release, the source must be recompiled. However, it is our goal to maintain source-code compatibility, and in the majority of cases, no changes to the source will be required.

Maya plug-ins

Before you can use the example plug-ins, you need to build them. You can choose to build the plug-ins in the folder to which they were installed or you can copy the plug-ins to your own working folder.

Building the plug-ins

Each plug-in resides in its own sub-folder. To build an individual plug-in, navigate to its sub-folder and double-click on the corresponding solution file (the .sln file) to load it into Microsoft Visual Studio 2012 Update 4. When the solution has finished loading, select Build Solution from the Build menu. Visual Studio will build your plug-in and place the resulting .mll file in a subdirectory representing the configuration you built the plug-in for. For example, to build the circleNode plug-in you would navigate to the C:\Program Files\Autodesk\maya2017\devkit\plug-ins\circleNode folder, double-click on the circleNode.sln file, and then build the solution. Assuming that you built for the Debug|x64 configuration, the resulting plug-in will end up in C:\Program Files\Autodesk\maya2017\devkit\plug-ins\circleNode\x64\Debug\circleNode.mll.

To build all of the example plug-ins, navigate to the Developer Kit's plug-ins folder (C:\Program Files\Autodesk\maya2017\devkit\plug-ins) and double-click on the Plugins.sln file to load it into Visual Studio. When the solution has finished loading, select Build Solution from the Build menu. Visual Studio should then rebuild all of the example plug-ins.

Loading your plug-in

For information about installing and loading your plug-in, see Installing a Maya plug-in.

Maya API Applications

Building the applications

You can choose to build the applications in the folder to which they were installed or you can copy the applications to your own working folder.

To build an individual application, double-click on its solution file (e.g. readAndWrite.sln) to load it into Microsoft Visual Studio, then select Build Solution from the Build menu. Visual Studio will build your application and place the resulting executable file in the C:\Program Files\Autodesk\Maya2017\devkit\applications folder.

To build all of the example Maya API applications, use the APIApplications.sln solution file.

Running the applications

If, during installation, you added the Maya executable directory to your path, you can run the application immediately. If you did not, you will need to copy your application to the Maya executable directory to run it.

Several environment variables must be set in order to run a standalone Maya API application. These are:

  • MAYA_LOCATION
  • Path

For example:

set MAYA_LOCATION=c:\Program Files\Autodesk\Maya2017
set Path=c:\Program Files\Autodesk\Maya2017\bin;%Path%

Note that %Path% is included so that existing commands are not lost to the shell.

Creating your own plug-in build file

The instructions in the previous section enable you to build and use the example plug-ins included with Maya, but you still need information on creating your own plug-ins. On Windows, the process for creating the source code files is the same as it is on Linux, but in addition you must create Microsoft "Project" files so that Developer Studio knows how to build the plug-in. You can do this using the plug-in wizard, described in the next section.