FBApplication is used mainly to manage files. More...
#include <pyfbsdk_generated.h>
Public Member Functions | |
FBApplication () | |
Constructor. | |
bool | AudioRender (FBAudioRenderOptions pAudioRenderOptions=None) |
Render audio of current scene to media file, currently WAV file only. | |
bool | ExecuteScript (str pFilename) |
Execute a python script file. | |
bool | FileAppend (str pFilename, bool pShowUIMsg=False, FBFbxOptions pOptions=None) |
Append one or multiple files to the current scene. | |
FBBatchStatus | FileBatch (FBBatchOptions pBatchOptions, FBPlotOptions pPlotOptions=None) |
Start a batch. | |
FileExit (bool pSave=False, int pExitCode=0) | |
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 | FileExportWithOptions (FBMotionFileExportOptions pOptions) |
Export a motion file with the ability to specify options. | |
bool | FileImport (str pFilename, bool pMatchModels=False, bool pCreateUnmatchedModels=True) |
Import a motion file. | |
bool | FileImportBatch (str pName, FBBatchOptions pBatchOptions, FBModel pReference) |
Import a motion file using batch options. | |
bool | FileImportWithOptions (FBMotionFileImportOptions pOptions) |
Import a motion file with the ability to specify options. | |
bool | FileMerge (str pFilename, bool pShowUIMsg=False, FBFbxOptions pOptions=None) |
Merge one or multiple files with the current scene. | |
bool | FileMerge (FBStringList pPathlist, bool pShowUIMsg=False, FBFbxOptions pOptions=None) |
Merge multiple files with the current scene. | |
bool | FileNew (bool pAskUser=False, bool pClearSceneName=True) |
Command File->New in the menus. | |
bool | FileOpen (str pFilename, bool pShowUIMsg=False, FBFbxOptions pOptions=None) |
Open a file, replacing the current scene. | |
bool | FileOpen (pBuffer, kULong pBufferLength) |
Open a file from memory. | |
bool | FileRender (FBVideoGrabOptions pRenderOptions=None) |
Render current scene to media file. | |
bool | FileSave (str pFilename=None, FBFbxOptions pOptions=None) |
Save the file under another name. | |
FlushEventQueue () | |
Flush event queue. | |
bool | GetMaxFrameCount (pBuffer, kULong pBufferLength, kLong pFrameCount, int pTimeScale) |
Get max frame count from a scene file in memory. | |
str | GetSceneAuthor () |
Return the scene author from the scene properties. | |
str | GetSceneComment () |
Return the scene comment from the scene properties. | |
str | GetSceneKeywords () |
Return the scene keywords from the scene properties. | |
str | GetSceneRevisionNumber () |
Return the scene revision number from the scene properties. | |
str | GetSceneSubject () |
Return the scene subject from the scene properties. | |
str | GetSceneTitle () |
Return the scene title from the scene properties. | |
bool | IsSceneModified () |
Is the scene modified since last save / new scene creation? | |
bool | IsValidBatchFile (str pFilename) |
Verify motion file readability. | |
bool | LoadAnimationOnCharacter (str pFileName, FBCharacter pCharacter, FBFbxOptions pFbxOptions, FBPlotOptions pPlotOptions) |
Load a rig and its animation from a file. | |
bool | Maximize () |
Maximize window (minimized). | |
bool | Minimize (bool pBlocking=True) |
Minimize window. | |
bool | OneClickAddToCurrentScene () |
Send the scene and add it to the current scene in the specified application. | |
FBOneClickApplication | OneClickIsConnectedTo () |
Return the other application that MotionBuilder is connected to. | |
OneClickSelectPreviouslySentObject () | |
Select, in MotionBuilder, the object that were sent. | |
bool | OneClickSendAsNewScene (FBOneClickApplication pApplication) |
Send the current scene as a new scene in the specified application. | |
bool | OneClickUpdateCurrentScene () |
Send the scene to update the current scene in the specified application. | |
bool | SaveCharacterRigAndAnimation (str pFileName, FBCharacter pCharacter, FBFbxOptions pFbxOptions) |
Save the rig and its animation in a file. | |
SetSceneAuthor (str pAuthor) | |
Set the scene author. | |
SetSceneComment (str pComment) | |
Set the scene comment. | |
SetSceneKeywords (str pKeywords) | |
Set the scene keywords. | |
SetSceneRevisionNumber (str pRevNumber) | |
Set the scene revision number. | |
SetSceneSubject (str pSubject) | |
Set the scene subject. | |
SetSceneTitle (str pTitle) | |
Set the scene title. | |
UpdateAllWidgets () | |
Request to refresh display of all UI widgets. | |
![]() | |
FBComponent () | |
Constructor. | |
str | ClassName () |
Get the class name. | |
DisableObjectFlags (FBObjectFlag pFlags) | |
Disable a specific Object Flags. | |
EnableObjectFlags (FBObjectFlag pFlags) | |
Enable a specific Object Flags. | |
bool | FBCreate () |
Open Reality Creation function. | |
FBDelete () | |
Open Reality deletion function. | |
FBDestroy () | |
Open Reality destruction function. | |
FBObjectFlag | GetObjectFlags () |
Get all Object Flags (concatenated). | |
bool | GetObjectStatus (FBObjectStatus pStatus) |
Check to see if an object status is enabled. | |
FBFileReference | GetOwnerFileReference (p0) |
Get the owner FileReference object. | |
HardSelect () | |
HardSelect. | |
bool | HasObjectFlags (FBObjectFlag pFlags) |
Check whether a specific object flag is enabled. | |
bool | Is (int pTypeId) |
Returns true if object is of type TypeId. | |
bool | ProcessNamespaceHierarchy (FBNamespaceAction pNamespaceAction, str pNamespaceName, str pReplaceTo=None, bool pAddRight=True) |
ProcessNamespaceHierarchy. | |
bool | ProcessObjectNamespace (FBNamespaceAction pNamespaceAction, str pNamespaceName, str pReplaceTo=None, bool pAddRight=True) |
ProcessObjectNamespace. | |
int | PropertyAdd (FBProperty pProperty) |
Add a property to the component's property manager. | |
bool | PropertyAddReferenceProperty (FBProperty pReferenceProperty) |
Add a reference property to the component's property manager. | |
FBProperty | PropertyCreate (str pName, FBType pType, str pDataType, bool pAnimatable, bool pIsUser=False, FBProperty pReferenceSource=None) |
Create user or dynamic property. | |
PropertyGetModifiedList (FBArrayTemplate< FB > pPropList, FBPlugModificationFlag pModificationFlags) | |
Get list of properties which have been modified since last loading. | |
PropertyRemove (FBProperty pProperty) | |
Remove a Property from the component's Property manager. | |
SetObjectFlags (FBObjectFlag pFlags) | |
SetObjectFlags. | |
SetObjectStatus (FBObjectStatus pStatus, bool pValue) | |
Enable/Disable a specific Object Status. | |
Public Attributes | |
FBApplicationState | ApplicationState |
Read Only Property: State the MotionBuilder application has been started in. | |
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. | |
FBEventOverrideFileOpen | OnOverrideFileOpen |
Event: Called when a file is about to be opened/merged. The user can override the process with his own file import system. | |
FBEvent | OnStartupCompleted |
Event: The startup of the application has been completed. | |
![]() | |
FBListComponent | Components |
List: List of components. | |
str | LongName |
Read Write Property: Name and namespace for object. | |
str | Name |
Read Write Property: Unique name of object. See sample: RemoveSuffixFromNameOfSceneElements.py. | |
FBListComponent | Parents |
List: Parents. | |
FBManager | PropertyList |
Read Only Property: Manages all of the properties for the component. | |
bool | Selected |
Read Write Property: Selected property. | |
int | TypeInfo |
Contains the Type information of the object. | |
![]() | |
str | ClassGroupName |
ClassGroupName of the object. | |
int | TypeInfo |
TypeInfo. | |
FBApplication is used mainly to manage files.
It provides functionality like that in the MotionBuilder file menu, for example, open file, save file.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.
See samples: FBFbxOptions.py, FBSystemEvents.py, ImportWithNamespace.py, BatchExportCharacterAnimationTool.py, ExportAnimationLibrary.py, SaveOneTakePerFile.py.
FBApplication | ( | ) |
Constructor.
bool AudioRender | ( | FBAudioRenderOptions | pAudioRenderOptions = None | ) |
Render audio of current scene to media file, currently WAV file only.
pAudioRenderOptions | The options used when rendering audio of the scene. Default value: 2 channels, 16 bits, 44100 hz, the begin and end time span for current time referential, Default file name is "Output.wav" in the last audio output path, ro the default document path if the last path doesn't exist. |
Execute a python script file.
See the FBPython class for advanced capabilities. Same as calling the FBPython.ExecuteScript method.
pFilename | The script file to execute. |
bool FileAppend | ( | str | pFilename, |
bool | pShowUIMsg = False , |
||
FBFbxOptions | pOptions = None |
||
) |
Append one or multiple files to the current scene.
Same as File->Merge in the menus with all options set to append. In earlier versions of MotionBuilder, a namespace could be specified with a parameter in this function, or FBFbxOptions::CustomImportNamespace, Now this is now done with FBFbxOptions::NamespaceList.
pFilename | File(s) to merge. For multiple files, use a list of files separated by '~'. |
pShowUIMsg | Set false if don't want to popup any UI dialog or messages (default=false). |
pOptions | Provide finer control on file open options (default=NULL). if not null, Option dialog will only show if both option's ShowOptionsDialog property and pShowUIMsg are true. It is possible to append multiple scenes, each one within its own user specified namespace, by calling the FBFbxOptions::SetMultiLoadNamespaceList method first. When doing so though, the FBFbxOption.NamespaceList property is then ignored. |
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). |
Quit application.
Command File->Exit in the menus.
pSave | true if file is saved on exit(default=false). |
pExitCode | Exit code of the application(default=0). |
Export a motion file.
Command File->Motion 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. |
bool FileExportWithOptions | ( | FBMotionFileExportOptions | pOptions | ) |
Export a motion file with the ability to specify options.
Command File->Motion File Export... in the menus.
pOptions | An FBMotionFileExportOptions object that contains the file path of the motion file(s) to export, as well as the options to export those motion files. |
Import a motion file.
Command File->Motion 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. |
pCreateUnmatchedModels | Whether unmatched models will be created. This flag matters only when pMatchModels is true. when pMatchModels is false, all the models are 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 FileImportWithOptions | ( | FBMotionFileImportOptions | pOptions | ) |
Import a motion file with the ability to specify options.
Command File->Motion File Import... in the menus.
pOptions | An FBMotionFileImportOptions object that contains the path to the files, as well as the options to load those motion files. |
bool FileMerge | ( | FBStringList | pPathlist, |
bool | pShowUIMsg = False , |
||
FBFbxOptions | pOptions = None |
||
) |
Merge multiple files with the current scene.
Command File->Merge in the menus.
pPathlist | Files to merge. |
pShowUIMsg | Set false if don't want to popup any UI dialog or messages (default=false). |
pOptions | Provide finer control on file open options (default=NULL). if not null, Option dialog will only show if both option's ShowOptionsDialog property and pShowUIMsg are true. It is possible to merge multiple scenes, each one within its own user specified namespace, by calling the FBFbxOptions::SetMultiLoadNamespaceList method first. When doing so though, the FBFbxOption.NamespaceList property is then ignored. |
bool FileMerge | ( | str | pFilename, |
bool | pShowUIMsg = False , |
||
FBFbxOptions | pOptions = None |
||
) |
Merge one or multiple files with the current scene.
Command File->Merge in the menus.
pFilename | File(s) to merge. For multiple files, use a list of files separated by '~'. |
pShowUIMsg | Set false if don't want to popup any UI dialog or messages (default=false). |
pOptions | Provide finer control on file open options (default=NULL). if not null, Option dialog will only show if both option's ShowOptionsDialog property and pShowUIMsg are true. It is possible to merge multiple scenes, each one within its own user specified namespace, by calling the FBFbxOptions::SetMultiLoadNamespaceList method first. When doing so though, the FBFbxOption.NamespaceList property is then ignored. |
Command File->New in the menus.
pAskUser | Set to true to cause a save dialog to popup. Default is false. |
pClearSceneName | Set to true to clear the scene name, set to false to retain it. Default is true. |
bool FileOpen | ( | pBuffer | , |
kULong | pBufferLength | ||
) |
Open a file from memory.
pBuffer | the memory buffer for the file. Raw memory address is expected in Python. |
pBufferLength | the memory buffer size. |
bool FileOpen | ( | str | pFilename, |
bool | pShowUIMsg = False , |
||
FBFbxOptions | pOptions = None |
||
) |
Open a file, replacing the current scene.
Command File->Open in the menus.
pFilename | File to open. |
pShowUIMsg | Set false if don't want to popup any UI dialog or messages (default=false). |
pOptions | Provide finer control on file open options (default=NULL). if not null, Option dialog will only show if both option's ShowOptionsDialog property and pShowUIMsg are true. |
See samples: BatchExportCharacterAnimationTool.py, RenameFirstTakeOnMultipleFiles.py.
bool 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. |
pOptions | Provide finer control on file save options (default=NULL) |
FlushEventQueue | ( | ) |
Flush event queue.
Processes all pending events for the calling thread until there are no more events to process. You can call this function occasionally when your code is busy performing a long operation (e.g. copying a file).
Get max frame count from a scene file in memory.
pBuffer | the memory buffer for the file. Raw memory address is expected in Python. |
pBufferLength | the memory buffer size. |
pFrameCount | (C++ only) out parameter to hold max frame count. |
pTimeScale | Time scale. |
str GetSceneAuthor | ( | ) |
Return the scene author from the scene properties.
str GetSceneComment | ( | ) |
Return the scene comment from the scene properties.
str GetSceneKeywords | ( | ) |
Return the scene keywords from the scene properties.
str GetSceneRevisionNumber | ( | ) |
Return the scene revision number from the scene properties.
str GetSceneSubject | ( | ) |
Return the scene subject from the scene properties.
str GetSceneTitle | ( | ) |
Return the scene title from the scene properties.
bool IsSceneModified | ( | ) |
Is the scene modified since last save / new scene creation?
Verify motion file readability.
pFilename | The file to test. |
bool LoadAnimationOnCharacter | ( | str | pFileName, |
FBCharacter | pCharacter, | ||
FBFbxOptions | pFbxOptions, | ||
FBPlotOptions | pPlotOptions | ||
) |
Load a rig and its animation from a file.
pFileName | File name. |
pCharacter | Target character. |
pFbxOptions | The options for the character rig and animation load |
pPlotOptions | If the animation should be plotted on the target rig, these plot options will be used. Set to NULL if animation will not be plotted. |
bool Maximize | ( | ) |
Maximize window (minimized).
Minimize window.
pBlocking | Is the minimization blocking operation (default = true). |
bool OneClickAddToCurrentScene | ( | ) |
Send the scene and add it to the current scene in the specified application.
FBOneClickApplication OneClickIsConnectedTo | ( | ) |
Return the other application that MotionBuilder is connected to.
OneClickSelectPreviouslySentObject | ( | ) |
Select, in MotionBuilder, the object that were sent.
bool OneClickSendAsNewScene | ( | FBOneClickApplication | pApplication | ) |
Send the current scene as a new scene in the specified application.
pApplication | The application that will receive the scene. |
bool OneClickUpdateCurrentScene | ( | ) |
Send the scene to update the current scene in the specified application.
bool SaveCharacterRigAndAnimation | ( | str | pFileName, |
FBCharacter | pCharacter, | ||
FBFbxOptions | pFbxOptions | ||
) |
Save the rig and its animation in a file.
pFileName | File name. |
pCharacter | Character to save. |
pFbxOptions | The options for the character rig and animation export |
SetSceneAuthor | ( | str | pAuthor | ) |
Set the scene author.
pAuthor | The author to set in the scene properties. |
SetSceneComment | ( | str | pComment | ) |
Set the scene comment.
pComment | The comment to set in the scene properties. |
SetSceneKeywords | ( | str | pKeywords | ) |
Set the scene keywords.
pKeywords | The keywords to set in the scene properties. |
SetSceneRevisionNumber | ( | str | pRevNumber | ) |
Set the scene revision number.
pRevNumber | The revision number to set in the scene properties. |
SetSceneSubject | ( | str | pSubject | ) |
Set the scene subject.
pSubject | The subject to set in the scene properties. |
SetSceneTitle | ( | str | pTitle | ) |
Set the scene title.
pTitle | The title to set in the scene properties. |
UpdateAllWidgets | ( | ) |
Request to refresh display of all UI widgets.
FBApplicationState ApplicationState |
Read Only Property: State the MotionBuilder application has been started in.
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.
FBEventOverrideFileOpen OnOverrideFileOpen |
Event: Called when a file is about to be opened/merged. The user can override the process with his own file import system.
FBEvent OnStartupCompleted |
Event: The startup of the application has been completed.