FBApplication - File I/O and Application Utilities

Application Utilities

FBApplication provides similar functionality to the "File" menu in MotionBuilder. An instance of FBApplication is required to save and load data from a file (see File Input and Output below).

It can also be used for minimizing (FBApplication.Minimize()), maximizing (FBApplication.Maximize()), or closing (FBApplication.FileExit()) the MotionBuilder application. The following code sample uses FBApplication.FileNew() to clear the scene. This is analogous to selecting File > New in the application menu, however the user will not be prompted to save the previous scene.

from pyfbsdk import *

# Get the instance of FBApplication.
app = FBApplication()

# Clear the scene.
app.FileNew()

File I/O

The FBApplication class is primarily used for file input and output operations such as importing, exporting, merging, and batch file processing. Most functions related to file I/O are defined in FBApplication, except for FBAudioClip and FBVideo, which respectively define audio and video file I/O functions. For more information, see File Input and Output.