Command Line Options

Command Line Options

MotionBuilder's command line options are useful for script or batch processing. The syntax to run MotionBuilder with specific flags is as follows:

motionbuilder.exe [flags] [Python script or filename]

Startup Flags

The following table lists the flags that you can use in the [flags] section of the command line syntax.

Flag Description
-console Opens an output window used by FBTrace in the ORSDK, where the appropriate stdout/err stream goes. If you choose to use this console output window for Python output, you also need to use the -verbosePython flag.
-F [filename] This is an alternative way to open a file with MotionBuilder at startup. If this flag is omitted, you must specify the filename you want to open as the last parameter in the list.
-g [width][height] Sets the window size of MotionBuilder to the values specified. The default state is maximized.
-S Starts MotionBuilder in full screen mode. This is equivalent to selecting Display > Full Screen inside the Viewer. To exit full screen mode, press Alt+Enter or Esc.
-suspendMessages Disables all the warnings and pop-up dialogs. This flag is useful for automation purposes when you do not want the script to be interrupted by dialog boxes. By default, all warnings and dialog boxes are shown.
-T[UI Name] Finds a tool with the matching name among the tools that MotionBuilder has registered, and activates it. This flag parameter is case sensitive.
NOTE:There is no space between the -T and the [UI Name] parameter.
-verbosePython

Outputs all Python messages to the appropriate stdout/err stream. This puts the Python print messages to the window that you activate using the -console flag as well as to the Python Editor.

This is the same location that FBTrace outputs to when using the OR SDK. By default, Python output is only presented in the Python Editor.

Command Line Usage Examples

  • Opens the scene contained in mia_blue.fbx on startup.
    motionbuilder.exe mia_blue.fbx
  • Launches in full screen mode and opens the scene contained in mia_blue.fbx
    motionbuilder.exe -S mia_blue.fbx
  • Launches the testScript.py script on startup and suppresses all message boxes that the script might generate.
    motionbuilder.exe -suspendMessages testScript.py
  • Launches the Audio tool located in the sample tools folder on startup.
    NOTE:The Audio tool needs to be compiled first.
    motionbuilder.exe -TAudio
  • Launches the Script.py script and sends the output to the console output window.
    motionbuilder.exe -console -verbosePython Script.py
  • Launches with an active window of 500 x 500, and opens the scene mia_blue.fbx.
    motionbuilder.exe -g 500 500 mia_blue.fbx
  • Launches the console, the Python Editor tool, and opens the scene contained in mia_blue.fbx.
    NOTE:The quotes surrounding "-TPython Editor" ensure that the Python Editor tool is launched. Without these quotes, only the Python tool is launched, if it exists.
    motionbuilder.exe -console "-TPython Editor" mia_blue.fbx

Environment Variables

You can use the following environment variables for modifying the behavior of MotionBuilder.