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.
- MB_CONFIG_DIR – You can set this environment variable to specify the directory where the MotionBuilder
configuration files are stored. If not set, the files are stored in the default location
(document or home directory).
- MOTIONBUILDER_PLUGIN_PATH – The list of directories contained in this environment variable determines the location
from which MotionBuilder loads the compiled plug-ins.
- MOTIONBUILDER_PYTHON_STARTUP – The list of directories contained in this environment variable determines the location
from which MotionBuilder loads the Python startup scripts.
- MOBU_FBX_EXTENSION_PATH – The list of directories contained in this environment variable determines the location
from which MotionBuilder loads the FBX MB extension plug-ins.
- FILMBOX_CONSOLE – The console appears when this environment variable is set to 1 (Windows only). Otherwise, the console does not appear.
- K_NO_CRASH_RECOVERY – Setting this environment variable to any value disables the crash signal handling
mechanism (Linux only). To enable the crash signal handling mechanism, do not set
this variable. When enabled, the handler might interfere with actions like crash debugging.
- MOTIONBUILDER_SAVELOAD_EMBEDMEDIAS – This environment variable is used for overriding the corresponding setting in a
configuration file. Any other value except Yes is considered as false.
- MOTIONBUILDER_SAVELOAD_SHOWEMBEDMEDIASOPTION – The ShowEmbedMediasOption preference item can be used in the SaveLoad section of a configuration file to control whether the Embed Medias checkbox appears
in the Save dialog box. This environment variable can also be used for overriding
the corresponding setting in a configuration file. Any other value except Yes is considered as false.