Following are the main ways to run Python
commands in MotionBuilder:
- By executing individual commands in the
Python Editor’s interactive console.
- At startup, from the command line, for
example motionbuilder.exe [flags]
[script]. See
Startup flags.
- A script can be assigned to a keyboard
shortcut as a Python Editor shortcut, or as a global MotionBuilder
shortcut. This is configured in config\Scripts\ActionScript.txt.
The file contains full instructions. See Binding shortcuts to a Python tool.
- From the Asset Browser via a custom path
(right click in the navigation tree). When you drag and drop from
the Asset Browser to the scene you are prompted to execute, add
to the scene, or both. Adding to the scene makes it accessible in
the Navigator under Scripts.
- At startup, from the Startup directory.
- From the Python Telnet console.
- With the Open Reality SDK C++ function FBApplication::ExecuteScript.
You can create scripts:
- With the Python tools provided with MotionBuilder.
These include an editor and several script development tools such
as autocomplete, syntax highlighting, and an interactive console.
These are collectively refered to as the Python Editor.
- In the text editor of your choice, or
in IDLE, the Python integrated development environment.