It provides functionality like that in the MotionBuilder file menu, for example, open file, save file.See also FBFbxManager, which gives you more options when saving or loading files. For example you can save only selected elements (characters, models, constraints, etc.) of the current scene. Note that 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.From MotionBuilder 2011 the following functions are deprecated: FBXFileOpen: use FBApplication::FileOpen() instead. FBXFileMerge: use FBApplication::FileMerge() instead. FBXFileAppend: use FBApplication::FileAppend() instead. FBXFileSave: use FBApplication::FileSave() instead.
See samples: FBFbxOptions.py, FBSystemEvents.py, ImportWithNamespace.py, BatchExportCharacterAnimationTool.py.
Public Member Functions |
|
FBApplication () | |
Constructor. |
|
bool | ExecuteScript (str pFilename) |
Execute a python script file. |
|
K_DEPRECATED bool | FBXFileAppend (str pFilename, FBFbxOptions pOptions=None) |
Deprecated, use FBApplication::FileAppend()
instead. |
|
K_DEPRECATED bool | FBXFileMerge (str pFilename, FBFbxOptions pOptions=None) |
Deprecated, use FBApplication::FileMerge()
instead. |
|
K_DEPRECATED bool | FBXFileOpen (str pFilename, FBFbxOptions pOptions=None) |
Deprecated, use FBApplication::FileOpen()
instead. |
|
K_DEPRECATED bool | FBXFileSave (str pFilename=None, FBFbxOptions pOptions=None) |
Deprecated, use FBApplication::FileSave()
instead. |
|
bool | FileAppend (str pFilename, bool pShowOptions=False, FBFbxOptions pOptions=None) |
Append a file to the current scene. |
|
FBBatchStatus | FileBatch (FBBatchOptions pBatchOptions, FBPlotOptions pPlotOptions=None) |
Start a batch. |
|
FileExit (bool pSave=False) | |
Quit application. |
|
bool | FileExport (str pFilename) |
Export a motion file. |
|
bool | FileExportBatch (str pName, FBTake pTake, FBBatchOptions pBatchOptions, FBModelList pExportModels) |
Export a motion file using batch options.
|
|
bool | FileImport (str pFilename, bool pMatchModels=False) |
Import a motion file. |
|
bool | FileImportBatch (str pName, FBBatchOptions pBatchOptions, FBModel pReference) |
Import a motion file using batch options.
|
|
bool | FileMerge (str pFilename, bool pShowOptions=False, FBFbxOptions pOptions=None) |
Merge a file with the current scene.
|
|
bool | FileNew () |
Command FILE->NEW in the menus. |
|
bool | FileOpen (str pFilename, bool pShowOptions=False, FBFbxOptions pOptions=None) |
Open a file, replacing the current scene.
|
|
FileRender (FBVideoGrabOptions pRenderOptions=None) | |
Render current scene to media file. |
|
bool | FileSave (str pFilename=None, FBFbxOptions pOptions=None) |
Save the file under another name. |
|
bool | IsValidBatchFile (str pFilename) |
Verify motion file readability. |
|
bool | Maximize () |
Maximize window (minimized). |
|
bool | Minimize (bool pBlocking=True) |
Minimize window. |
|
SwitchViewerCamera (FBCamera pCamera) | |
Switch the current viewer's camera. |
|
Public Attributes |
|
FBActor | CurrentActor |
Read Write Property: Indicate the
current actor, as used by the character tool. Can be NULL. If not
null, CurrentCharacter must be null, as the character tool works on
only one item at a time. |
|
FBCharacter | CurrentCharacter |
Read Write Property: Indicate the
current character, as used by the character tool. Can be NULL. If
not null, CurrentActor must be null, as the character tool works on
only one item at a time.
See sample: CurrentCharacterGoToStancePose.py. |
|
str | FBXFileName |
Read Write Property: Current scene
filename. |
|
FBEvent | OnFileExit |
Event: A File Exit as been requested,
nothing has been destroyed yet. |
|
FBEvent | OnFileMerge |
Event: A File Merge has been
requested, nothing has been loaded yet. |
|
FBEvent | OnFileNew |
Event: A File New has been requested,
nothing has been destroyed yet. |
|
FBEvent | OnFileNewCompleted |
Event: A File New has been completed.
|
|
FBEvent | OnFileOpen |
Event: A File Open has been
requested, nothing has been loaded yet. |
|
FBEvent | OnFileOpenCompleted |
Event: A File Open has been
completed. |
|
FBEvent | OnFileSave |
Event: A File Save has been
requested, nothing has been saved yet. |
|
FBEvent | OnFileSaveCompleted |
Event: A File Save has been
completed. |
FBApplication | ( | ) |
Constructor.
Execute a python script file.
pFilename | The script file to execute. |
K_DEPRECATED bool FBXFileAppend | ( | str | pFilename, | |
FBFbxOptions | pOptions = None |
|||
) |
Deprecated, use FBApplication::FileAppend() instead.
Appends a file to the current scene.
pFilename | File to merge. | |
pOptions | namespace added to all objects in the loaded scene (default=NULL) |
K_DEPRECATED bool FBXFileMerge | ( | str | pFilename, | |
FBFbxOptions | pOptions = None |
|||
) |
Deprecated, use FBApplication::FileMerge() instead.
Merges a file with the current scene.
pFilename | File to merge. | |
pOptions | namespace added to all objects in the loaded scene (default=NULL) |
K_DEPRECATED bool FBXFileOpen | ( | str | pFilename, | |
FBFbxOptions | pOptions = None |
|||
) |
Deprecated, use FBApplication::FileOpen() instead.
Opens a file, replacing the current scene.
pFilename | File to open. | |
pOptions | namespace added to all objects in the loaded scene (default=NULL) |
K_DEPRECATED bool FBXFileSave | ( | str | pFilename = None , |
|
FBFbxOptions | pOptions = None |
|||
) |
Deprecated, use FBApplication::FileSave() instead.
Save the file under another name.
pFilename | Save file as pFilename. A value of NULL will use the current file name. |
bool FileAppend | ( | str | pFilename, | |
bool | pShowOptions =
False , |
|||
FBFbxOptions | pOptions = None |
|||
) |
Append a file to the current scene.
Same as File->Merge in the menus with all options set to append.
pFilename | File to merge. | |
pShowOptions | true if options dialog is showed (default=false). | |
pOptions | namespace added to all objects in the loaded scene (default=NULL) |
FBBatchStatus FileBatch | ( | FBBatchOptions | pBatchOptions, | |
FBPlotOptions | pPlotOptions =
None |
|||
) |
Start a batch.
Command FILE->BATCH in the menus.
pBatchOptions | The options for the batch process (same as in the batch UI). | |
pPlotOptions | The options for plotting (same as in the plot UI)(default=NULL). |
FileExit | ( | bool | pSave = False |
) |
Quit application.
Command FILE->EXIT in the menus.
pSave | true if file is saved on exit(default=false). |
Export a motion file.
Command FILE->EXPORT in the menus.
pFilename | The file to create. To create two files at the same time (ex: .amc & .asf), separate the two files path with a comma ("Path1,Path2"). |
bool FileExportBatch | ( | str | pName, | |
FBTake | pTake, | |||
FBBatchOptions | pBatchOptions, | |||
FBModelList | pExportModels | |||
) |
Export a motion file using batch options.
Export used for saving files in batch process.
pName | The name of the file without extension. Extension and path will be taken from batch options. | |
pTake | Animation take to the export. | |
pBatchOptions | The options for the export. | |
pExportModels | Models to the export. |
Import a motion file.
Command FILE->IMPORT in the menus.
pFilename | The file to import. To import two files at the same time (ex: .amc & .asf), separate the two files path with a comma ("Path1,Path2"). | |
pMatchModels | If there is already a model in the scene with the same name, the model will not be created and we replace the animation of the given model. If there are models selected in the scene, only these models will be checked for a potential name match. If only one model is selected (ex: hips), this models and its hierarchy will be used. Every unmatched models will be created. |
bool FileImportBatch | ( | str | pName, | |
FBBatchOptions | pBatchOptions, | |||
FBModel | pReference | |||
) |
Import a motion file using batch options.
Import used for loading files in batch process.
pName | The name of the file without extension. Extension and path will be taken from batch options. | |
pBatchOptions | The options for the import. | |
pReference | Reference model for the import. |
bool FileMerge | ( | str | pFilename, | |
bool | pShowOptions =
False , |
|||
FBFbxOptions | pOptions = None |
|||
) |
Merge a file with the current scene.
Command File->Merge in the menus.
pFilename | File to merge. | |
pShowOptions | true if options dialog is showed (default=false). | |
pOptions | namespace added to all objects in the loaded scene (default=NULL) |
bool FileNew | ( | ) |
Command FILE->NEW in the menus.
bool FileOpen | ( | str | pFilename, | |
bool | pShowOptions =
False , |
|||
FBFbxOptions | pOptions = None |
|||
) |
Open a file, replacing the current scene.
Command File->Open in the menus.
pFilename | File to open. | |
pShowOptions | true if options dialog is showed (default=false). | |
pOptions | namespace added to all objects in the loaded scene (default=NULL) |
FileRender | ( | FBVideoGrabOptions | pRenderOptions =
None |
) |
Render current scene to media file.
Command FILE->RENDER in the menus.
pRenderOptions | The options used when rendering the scene. If you don't specify them, current one are used. |
bool FileSave | ( | str | pFilename = None , |
|
FBFbxOptions | pOptions = None |
|||
) |
Save the file under another name.
Command File->SaveAs in the menus.
pFilename | Save file as pFilename. A value of NULL will use the current file name. |
Verify motion file readability.
pFilename | The file to test. |
bool Maximize | ( | ) |
Maximize window (minimized).
Minimize window.
pBlocking | Is the minimization blocking operation (default = true). |
SwitchViewerCamera | ( | FBCamera | pCamera | ) |
Switch the current viewer's camera.
pCamera | Camera to switch current viewer to. |
Read Write Property: Indicate the current actor, as used by the character tool. Can be NULL. If not null, CurrentCharacter must be null, as the character tool works on only one item at a time.
Read Write Property: Indicate the current character, as used by the character tool. Can be NULL. If not null, CurrentActor must be null, as the character tool works on only one item at a time. See sample: CurrentCharacterGoToStancePose.py.
Read Write Property: Current scene filename.
Event: A File Exit as been requested, nothing has been destroyed yet.
Event: A File Merge has been requested, nothing has been loaded yet.
Event: A File New has been completed.
Event: A File Open has been requested, nothing has been loaded yet.
Event: A File Open has been completed.
Event: A File Save has been requested, nothing has been saved yet.
Event: A File Save has been completed.