MotionBuilder Python API
 
 
 

MotionBuilder Python API

The MotionBuilder Python API is contained in the pyfbsdk module. This module was generated using the Boost.Python library, which binds C++ functions to Python functions. The functions contained in this module therefore have analogous signatures to the MotionBuilder C++ API (ORSDK).

The MotionBuilder Python API also includes the pyfbsdk_additions module, which contains Python specific enhancements and some additional functionality. This module was not generated by the Boost.Python library, and was written separately.

For more information on how to get started with Python and MotionBuilder, including how to run your first Python program, see Using Python with MotionBuilder.

MotionBuilder's Python Interpreter

MotionBuilder comes packaged with its own Python interpreter. This means that the Python programs you write are excecuted within the MotionBuilder application. For information on the current version of MotionBuilder's Python interpreter, see Python Requirements.

Why would I want to use Python with MotionBuilder?

Compared to many other programming languages, Python is easy to use and learn. Its design emphasizes programmer productivity and code readability. The interactive interpreter allows you to type lines of code and have them execute immediately. Moreover, Python development tools are generally free, and MotionBuilder comes with its own built-in Python Editor to facilitate development and program execution.

By contrast, C++ development on Windows usually requires an installation of Visual Studio. C++ code must also be compiled into a .dll file, and placed in MotionBuilder's plugin directory.

Python is a multi-paradigm language, which means you can write simple procedural scripts, or develop larger object-oriented programs. It is used as a scripting language for many tools including Autodesk Maya, Autodesk Softimage, and it is widely used in pipelines throughout the computer graphics industry.

The Python official website at python.org includes documentation, downloads and links to the community.