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]
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. |
-setAsFrontMostApp | Mac only. When launching MotionBuilder from a terminal, MotionBuilder looses focus to the terminal. This can cause problems when you are trying to automate with scripts. This flag keeps the focus of MotionBuilder and sets it as the front most application. |
-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. |
-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. |
motionbuilder.exe mia_blue.fbx
motionbuilder.exe -S mia_blue.fbx
motionbuilder.exe -suspendMessages testScript.py
motionbuilder.exe -TAudio
motionbuilder.exe -console -verbosePython Script.py
motionbuilder.exe -g 500 500 mia_blue.fbx
motionbuilder.exe -console "-TPython Editor" mia_blue.fbx