Command Line Options

 
 
 

Command Line Options

MotionBuilder's command line options can be 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 presents the list of available flags which can be used in the [flags] section of the command line syntax above.

Flag Description
-console This opens an output window used by FBTrace in the OR SDK, 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 if it is found, activates it. This flag parameter is case sensitive.
NoteThere 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 script testScript.py 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.
    NoteThe Audio tool needs to be compiled first.
    motionbuilder.exe -TAudio
  • Launches the script Script.py and sends the output to the console output window.
    motionbuilder.exe -console -verbosePython Script.py
  • Launches with an active window of 500x500, 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.
    NoteThe quotes surrounding "-TPython Editor" are there to ensure the Python Editor tool is launched. Without these quotes, only the Python tool would be launched, if it exists.
    motionbuilder.exe -console "-TPython Editor" mia_blue.fbx

Environment Variables

You can set the following environment variables to modify MotionBuilder's behavior when it launches.