Share

The Maya API

The Maya devkit contains C++, Python, and .NET APIs.

Two versions of the Python API are included in the devkit. Python API 1.0 is a version of the C++ API that has been converted to Python, while Python API 2.0 is a port of the API to Python. Python API 2.0 is more pythonic than API 1.0 and contains Python-specific features.

The Maya API is platform neutral. There are no platform-specific calls in the Maya API. However, the source code does have to be recompiled for each platform on which you plan to use your plug-in or application. The CMake build system makes building for different operating systems easier by using a single build file for all operating systems.

The Maya API is broadly divided into proxy, wrapper, and function set classes, with Maya scene graph objects being represented by the MObject class.

MObjects provide a handle to the Maya screen graph objects. Function sets corresponding to the MObject's internal type are used to manipulate the MObject, and consequently the underlying graph object.

Wrappers are classes that enclose a basic object that is not a scene graph object. They define their own interfaces to manipulate the enclosed object directly.

You can define your own graph object by extending one of the existing proxy classes. You can use the function sets associated with the proxy class you extended to manipulate your new graph object.

Was this information helpful?