FBApplication
 
 
 

Most file-related functions are members of the class FBApplication, except for video and audio which are in FBVideo and FBAudioClip.

FBApplication is used for manipulation of the application and files. Much of the functionality in the MotionBuilder File Menu can be accessed with this class, for example opening, saving, and creating new files.

Event registration is instanced based. When an FBApplication object is destroyed, all the event callbacks are unregistered. If you want to have a tool to be notified of events, it needs to have a FBApplication data member.

The properties CurrentActor and CurrentCharacter cannot be non-null at the same time. The character tool will work on only one item at a time. When no item is selected in the tool, both properties will be null.

The code below uses FBApplication::FileOpen, which is the equivalent of File > Open in the MotionBuilder GUI. You can also use the equivalent of File > Import from the GUI, which would be FBApplication::FileImport.

from pyfbsdk import FBApplication
#initialize the class we are going to use
myApp = FBApplication()
#call the function to open a file, passing it the path to a file
# escape some characters
myApp.FileOpen ("c:\\proj\\myfile.fbx")