4.3 api -- Wrappers around the Maya C++ SDK

This module contains wrappers around the classes in the Maya SDK. The module tries to be as close to the C++ API as possible so that the Maya API documentation is also applicable to this Python version. In the following, only the differences between the C++ API and the Python bindings is documented. Please refer to your Maya documentation for a full description of the API.


In the C++ API strings are usually passed as MString objects. The MString class is also available in the Python version but whereever a method expects a MString object it also accepts a regular Python string as well.

Methods returning a MString object in the C++ API will return a regular string in Python.

Float sequences:

Instead of MPoint, MVector, MFloatPoint, MFloatVector or MColor it is also possible to pass sequences with an appropriate number of floats.

Automatic exception translation:

...Translating MStatus objects to exceptions is not yet implemented...

The following subsections document those parts of the API where the Python version differs from the C++ version.