Open Reality Reference Guide
FBApplication Class Reference

FBApplication is used mainly to manage files. More...

#include <fbapplication.h>

Inheritance diagram for FBApplication:

Public Member Functions

 FBApplication (HIObject pObject=NULL)
 Constructor. More...
 
bool Minimize (bool pBlocking=true)
 Minimize window. More...
 
bool Maximize ()
 Maximize window (minimized). More...
 
void UpdateAllWidgets ()
 Request to refresh display of all UI widgets. More...
 
void FlushEventQueue ()
 Flush event queue. More...
 
bool IsSceneModified ()
 Is the scene modified since last save / new scene creation? More...
 
bool FileNew (bool pAskUser=false, bool pClearSceneName=true)
 Command File->New in the menus. More...
 
bool FileOpen (const char *pFilename, bool pShowUIMsg=false, FBFbxOptions *pOptions=NULL)
 Open a file, replacing the current scene. More...
 
bool FileOpen (void *pBuffer, kULong pBufferLength)
 Open a file from memory. More...
 
bool GetMaxFrameCount (void *pBuffer, kULong pBufferLength, kLong *pFrameCount, int pTimeScale)
 Get max frame count from a scene file in memory. More...
 
bool FileMerge (const char *pFilename, bool pShowUIMsg=false, FBFbxOptions *pOptions=NULL)
 Merge one or multiple files with the current scene. More...
 
bool FileMerge (FBStringList &pPathlist, bool pShowUIMsg=false, FBFbxOptions *pOptions=NULL)
 Merge multiple files with the current scene. More...
 
bool FileAppend (const char *pFilename, bool pShowUIMsg=false, FBFbxOptions *pOptions=NULL)
 Append one or multiple files to the current scene. More...
 
bool FileSave (const char *pFilename=NULL, FBFbxOptions *pOptions=NULL)
 Save the file under another name. More...
 
void FileExit (bool pSave=false, int pExitCode=0)
 Quit application. More...
 
bool FileImport (FBString pFilename, bool pMatchModels=false, bool pCreateUnmatchedModels=true)
 Import a motion file. More...
 
bool FileImportWithOptions (FBMotionFileOptions *pOptions)
 Import a motion file with the ability to specify options. More...
 
bool FileExport (FBString pFilename)
 Export a motion file. More...
 
FBBatchStatus FileBatch (FBBatchOptions *pBatchOptions, FBPlotOptions *pPlotOptions=NULL)
 Start a batch. More...
 
bool FileImportBatch (const char *pName, FBBatchOptions *pBatchOptions, FBModel *pReference)
 Import a motion file using batch options. More...
 
bool FileExportBatch (const char *pName, FBTake *pTake, FBBatchOptions *pBatchOptions, FBModelList &pExportModels)
 Export a motion file using batch options. More...
 
bool SaveCharacterRigAndAnimation (const char *pFileName, FBCharacter *pCharacter, FBFbxOptions *pFbxOptions)
 Save the rig and its animation in a file. More...
 
bool LoadAnimationOnCharacter (const char *pFileName, FBCharacter *pCharacter, FBFbxOptions *pFbxOptions, FBPlotOptions *pPlotOptions)
 Load a rig and its animation from a file. More...
 
bool IsValidBatchFile (const char *pFilename)
 Verify motion file readability. More...
 
bool OneClickSendAsNewScene (FBOneClickApplication pApplication)
 Send the current scene as a new scene in the specified application. More...
 
bool OneClickUpdateCurrentScene ()
 Send the scene to update the current scene in the specified application. More...
 
bool OneClickAddToCurrentScene ()
 Send the scene and add it to the current scene in the specified application. More...
 
void OneClickSelectPreviouslySentObject ()
 Select, in MotionBuilder, the object that were sent. More...
 
FBOneClickApplication OneClickIsConnectedTo ()
 Return the other application that MotionBuilder is connected to. More...
 
bool FileRender (FBVideoGrabOptions *pRenderOptions=NULL)
 Render current scene to media file. More...
 
bool AudioRender (FBAudioRenderOptions *pAudioRenderOptions=NULL)
 Render audio of current scene to media file, currently WAV file only. More...
 
bool ExecuteScript (FBString pFilename)
 Execute a python script file. More...
 
const char * GetSceneTitle ()
 Return the scene title from the scene properties. More...
 
void SetSceneTitle (const char *pTitle)
 Set the scene title. More...
 
const char * GetSceneSubject ()
 Return the scene subject from the scene properties. More...
 
void SetSceneSubject (const char *pSubject)
 Set the scene subject. More...
 
const char * GetSceneAuthor ()
 Return the scene author from the scene properties. More...
 
void SetSceneAuthor (const char *pAuthor)
 Set the scene author. More...
 
const char * GetSceneKeywords ()
 Return the scene keywords from the scene properties. More...
 
void SetSceneKeywords (const char *pKeywords)
 Set the scene keywords. More...
 
const char * GetSceneRevisionNumber ()
 Return the scene revision number from the scene properties. More...
 
void SetSceneRevisionNumber (const char *pRevNumber)
 Set the scene revision number. More...
 
const char * GetSceneComment ()
 Return the scene comment from the scene properties. More...
 
void SetSceneComment (const char *pComment)
 Set the scene comment. More...
 
- Public Member Functions inherited from FBComponent
 FBComponent (HIObject pObject)
 Constructor. More...
 
virtual ~FBComponent ()
 Destructor. More...
 
virtual bool FBCreate ()
 Open Reality Creation function. More...
 
virtual void FBDestroy ()
 Open Reality destruction function. More...
 
virtual void FBDelete () override
 Open Reality deletion function. More...
 
virtual bool SetHIObject (HIObject pObject, bool pSDKComponent) override
 Assign component to an internal pointer. More...
 
virtual int PropertyAdd (FBProperty *pProperty)
 Add a property to the component's property manager. More...
 
bool PropertyAddReferenceProperty (FBProperty *pReferenceProperty)
 Add a reference property to the component's property manager. More...
 
void PropertyRemove (FBProperty *pProperty)
 Remove a Property from the component's Property manager. More...
 
void PropertyGetModifiedList (FBArrayTemplate< FBProperty * > &pPropList, FBPlugModificationFlag pModificationFlags)
 Get list of properties which have been modified since last loading. More...
 
FBPropertyPropertyCreate (const char *pName, FBPropertyType pType, const char *pDataType, bool pAnimatable, bool pIsUser=false, FBProperty *pReferenceSource=NULL)
 Create user or dynamic property. More...
 
FBObjectFlag GetObjectFlags ()
 Get all Object Flags (concatenated). More...
 
void SetObjectFlags (FBObjectFlag pFlags)
 SetObjectFlags. More...
 
bool HasObjectFlags (FBObjectFlag pFlags)
 Check whether a specific object flag is enabled. More...
 
void EnableObjectFlags (FBObjectFlag pFlags)
 Enable a specific Object Flags. More...
 
void DisableObjectFlags (FBObjectFlag pFlags)
 Disable a specific Object Flags. More...
 
void SetObjectStatus (FBObjectStatus pStatus, bool pValue)
 Enable/Disable a specific Object Status. More...
 
bool GetObjectStatus (FBObjectStatus pStatus)
 Check to see if an object status is enabled. More...
 
bool ProcessNamespaceHierarchy (FBNamespaceAction pNamespaceAction, const char *pNamespaceName, const char *pReplaceTo=NULL, bool pAddRight=true)
 ProcessNamespaceHierarchy. More...
 
bool ProcessObjectNamespace (FBNamespaceAction pNamespaceAction, const char *pNamespaceName, const char *pReplaceTo=NULL, bool pAddRight=true)
 ProcessObjectNamespace. More...
 
virtual const char * ClassName () override
 Get the class name. More...
 
virtual bool UseCustomPropertyViewSet () const
 Use the custom property viewSet or not. More...
 
const char * GetFullName (void)
 Get the full name. More...
 
void SetOwnerNamespace (FBNamespace *pOwnerNSObj)
 Set the owner Namespace object. More...
 
FBNamespaceGetOwnerNamespace (void)
 Get the owner Namespace object. More...
 
FBFileReferenceGetOwnerFileReference (void)
 Get the owner FileReference object. More...
 
void HardSelect ()
 HardSelect. More...
 
virtual bool Is (int pTypeId) override
 Returns true if object is of type TypeId. More...
 
virtual int GetTypeId () override
 GetTypeId( int pTypeId ) More...
 
- Public Member Functions inherited from FBWrapperHolder
FBScriptWrapperGetWrapper ()
 Return the wrapper interface of this FBObject. More...
 
void AddWrapper (FBScriptWrapper *)
 
void RemoveWrapper (FBScriptWrapper *)
 

Static Public Member Functions

static FBApplicationTheOne ()
 Get the global object for this class. More...
 
- Static Public Member Functions inherited from FBComponent
static int GetInternalClassId ()
 
static void FBComponentSetName (FBComponent *pObject, const char *pName)
 
static const char * FBComponentGetName (FBComponent *pObject)
 
static void FBComponentSetLongName (FBComponent *pObject, const char *pName)
 
static const char * FBComponentGetLongName (FBComponent *pObject)
 

Public Attributes

FBPropertyApplicationState ApplicationState
 Read Only Property: State the MotionBuilder application has been started in. More...
 
FBPropertyEvent OnFileNewCompleted
 Event: A File New has been completed. More...
 
FBPropertyEvent OnFileNew
 Event: A File New has been requested, nothing has been destroyed yet. More...
 
FBPropertyEvent OnFileOpenCompleted
 Event: A File Open has been completed. More...
 
FBPropertyEvent OnFileOpen
 Event: A File Open has been requested, nothing has been loaded yet. More...
 
FBPropertyEvent OnFileMerge
 Event: A File Merge has been requested, nothing has been loaded yet. More...
 
FBPropertyEvent OnFileSaveCompleted
 Event: A File Save has been completed. More...
 
FBPropertyEvent OnFileSave
 Event: A File Save has been requested, nothing has been saved yet. More...
 
FBPropertyEvent OnFileExit
 Event: A File Exit as been requested, nothing has been destroyed yet. More...
 
FBPropertyEventOverrideFileOpen OnOverrideFileOpen
 Event: Called when a file is about to be opened/merged. The user can override the process with his own file import system. More...
 
FBPropertyString FBXFileName
 Read Write Property: Current scene filename. More...
 
FBPropertyActor 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. More...
 
FBPropertyCharacter 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. More...
 
- Public Attributes inherited from FBComponent
FBPropertyManager PropertyList
 Read Only Property: Manages all of the properties for the component. More...
 
FBPropertyListComponent Components
 List: List of components. More...
 
FBPropertyListComponent Parents
 List: Parents. More...
 
FBPropertyBool Selected
 Read Write Property: Selected property. More...
 
FBPropertyString Name
 Read Write Property: Unique name of object. More...
 
FBPropertyString LongName
 Read Write Property: Name and namespace for object.
More...
 
FBPropertyFolder Folder
 Read Write Property: The folder that contain this component. More...
 

Additional Inherited Members

- Static Public Attributes inherited from FBComponent
static int TypeInfo
 Contains the Type information of the object. More...
 
- Protected Member Functions inherited from FBPlug
bool IsSDKComponent ()
 Return whether or not item is an SDK component. More...
 
bool ConnectSrc (FBPlug *pSrc, FBConnectionType pConnectionType=kFBConnectionTypeNone)
 Add a source connection. More...
 
bool ConnectDst (FBPlug *pDst, FBConnectionType pConnectionType=kFBConnectionTypeNone)
 Add a destination connection. More...
 
bool ConnectSrcAt (int pDst_SrcIndex, FBPlug *pSrc, FBConnectionType pConnectionType=kFBConnectionTypeNone)
 Add a source connection. More...
 
bool ConnectDstAt (int pSrc_DstIndex, FBPlug *pDst, FBConnectionType pConnectionType=kFBConnectionTypeNone)
 Add a destination connection. More...
 
bool DisconnectDst (FBPlug *pDst)
 Remove a destination connection. More...
 
bool DisconnectSrc (FBPlug *pSrc)
 Remove a source connection. More...
 
void DisconnectAllSrc ()
 Remove all source connections. More...
 
void DisconnectAllDst ()
 Remove all destination connections. More...
 
bool DisconnectDstAt (int pIndex)
 Remove a destination connection at a specified index. More...
 
bool DisconnectSrcAt (int pIndex)
 Remove a source connection at a specified index. More...
 
bool ReplaceDstAt (int pIndex, FBPlug *pDst)
 Replace a destination connection at a specified index. More...
 
bool ReplaceSrcAt (int pIndex, FBPlug *pSrc)
 Replace a source connection at a specified index. More...
 
bool SwapSrc (int pIndexA, int pIndexB)
 Swap source connection at index A with source connection at index B. More...
 
bool MoveSrcAt (int pIndex, int pAtIndex)
 Move source connection at pIndex to pAtIndex. More...
 
bool MoveSrcAt (FBPlug *pSrc, FBPlug *pAtSrc)
 Move source connection pSrc to the position of pAtSrc. More...
 
int GetSrcCount ()
 Get source connection count. More...
 
FBPlugGetSrc (int pIndex)
 Get a source connection's plug at specified index. More...
 
FBConnectionType GetSrcType (int pIndex)
 Get a source connection's type at specified index. More...
 
int GetDstCount ()
 Get destination connection count. More...
 
FBPlugGetDst (int pIndex)
 Get a destination connection's plug at specified index. More...
 
FBConnectionType GetDstType (int pIndex)
 Get a destination connection's type at specified index. More...
 
bool BeginChange ()
 Begins a change on multiple plugs. More...
 
void EndChange ()
 Ends a change on multiple plugs. More...
 
void SetSelfModified (FBPlugModificationFlag pFlag, bool pBool)
 Set the plug's self modification flag. More...
 
bool GetSelfModified (FBPlugModificationFlag pFlag)
 Tell if the plug's self has changed. More...
 
void SetContentModified (FBPlugModificationFlag pFlag, bool pBool)
 Set the plug's owned property/object's modification flag. More...
 
bool GetContentModified (FBPlugModificationFlag pFlag)
 Tell if the plug's content has changed. More...
 
int GetPlugConnectionModifiedList (FBPlugList &pPlugList, FBPlugModificationFlag pConnectionModificatonFlag, bool pAddRemove)
 Get plug's modified src/dst property/object connection added/removed List. More...
 
bool RevertModification (FBPlugModificationFlag pFlag=kFBAllModifiedMask)
 Revert the plug's modification to original status. More...
 
void SetStatusFlag (FBPlugStatusFlag pStatus, bool pValue)
 Set the plug's status flag. More...
 
bool GetStatusFlag (FBPlugStatusFlag pStatus) const
 Tell if the plug's status has changed. More...
 
FBPlugGetOwner ()
 Get the owner of this plug. More...
 
FBPlugGetOwned (int pIndex)
 Get the owned plug at specified index. More...
 
int GetOwnedCount ()
 Get the owned plug count. More...
 
virtual bool PlugDataNotify (FBConnectionAction pAction, FBPlug *pThis, void *pData=NULL, void *pDataOld=NULL, int pDataSize=0)
 PlugDataNotify when overloaded is equivalent of FBSystem.OnConnectionDataNotify but in the context of the derived object only. More...
 
virtual bool PlugStateNotify (FBConnectionAction pAction, FBPlug *pThis, void *pData=NULL, void *pDataOld=NULL, int pDataSize=0)
 PlugStateNotify when overloaded is equivalent of FBSystem.OnConnectionStateNotify but in the context of the derived object only. More...
 
virtual bool PlugNotify (FBConnectionAction pAction, FBPlug *pThis, int pIndex, FBPlug *pPlug=NULL, FBConnectionType pConnectionType=kFBConnectionTypeNone, FBPlug *pNewPlug=NULL)
 PlugNotify when overloaded is equivalent of FBSystem.OnConnectionNotify but in the context of the derived object only. More...
 
- Static Protected Member Functions inherited from FBPlug
static int GetInternalClassId ()
 Internal class Id. More...
 
- Protected Attributes inherited from FBPlug
bool mAllocated
 Contain the Allocation State of the Component. More...
 
HIObject mObject
 Handle on the Plug. More...
 
bool mSDKComponent
 bool Plug is an SDK component.
More...
 
- Static Protected Attributes inherited from FBPlug
static const char * ClassGroupName
 ClassGroupName of the object. More...
 
static int TypeInfo
 TypeInfo. More...
 
static int mGlobalTypeInfo
 Represente the Type Index. More...
 

Detailed Description

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.

Definition at line 316 of file fbapplication.h.

Constructor & Destructor Documentation

◆ FBApplication()

FBApplication ( HIObject  pObject = NULL)

Constructor.

Parameters
pObjectInternal parent object(default=NULL).

Member Function Documentation

◆ AudioRender()

bool AudioRender ( FBAudioRenderOptions pAudioRenderOptions = NULL)

Render audio of current scene to media file, currently WAV file only.

Parameters
pAudioRenderOptionsThe 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.
Returns
True if the file was rendered successfully
Warning
If the destination media file exist, it will be overwritten by default. If the destination media file is opened by other application, the audio render process may not success because of not able to open it.

◆ ExecuteScript()

bool ExecuteScript ( FBString  pFilename)

Execute a python script file.

Parameters
pFilenameThe script file to execute.
Returns
True if the script file was found and executed.
Remarks
This function can only be used in the UI thread.

◆ FileAppend()

bool FileAppend ( const char *  pFilename,
bool  pShowUIMsg = false,
FBFbxOptions pOptions = NULL 
)

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.

Parameters
pFilenameFile(s) to merge. For multiple files, use a list of files separated by '~'.
pShowUIMsgSet false if don't want to popup any UI dialog or messages (default=false).
pOptionsProvide 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.
Returns
true if successful.

◆ FileBatch()

FBBatchStatus FileBatch ( FBBatchOptions pBatchOptions,
FBPlotOptions pPlotOptions = NULL 
)

Start a batch.

Command File->Batch... in the menus.

Parameters
pBatchOptionsThe options for the batch process (same as in the batch UI).
pPlotOptionsThe options for plotting (same as in the plot UI)(default=NULL).
Returns
The status of the operation.

◆ FileExit()

void FileExit ( bool  pSave = false,
int  pExitCode = 0 
)

Quit application.

Command File->Exit in the menus.

Parameters
pSavetrue if file is saved on exit(default=false).
pExitCodeExit code of the application(default=0).

◆ FileExport()

bool FileExport ( FBString  pFilename)

Export a motion file.

Command File->Motion File Export... in the menus.

Parameters
pFilenameThe file to create. To create two files at the same time (ex: .amc & .asf), separate the two files path with a comma ("Path1,Path2").
Returns
True if the export succeeded.
Remarks
If the file exists, it will be overwritten.
current take is use.
The last parameter is only used for motion files.
For now, you cannot export custom file types.
Currently, only the default export options are used.
Warning
The signature of this function might change in the future to support export options.

◆ FileExportBatch()

bool FileExportBatch ( const char *  pName,
FBTake pTake,
FBBatchOptions pBatchOptions,
FBModelList pExportModels 
)

Export a motion file using batch options.

Export used for saving files in batch process.

Parameters
pNameThe name of the file without extension. Extension and path will be taken from batch options.
pTakeAnimation take to the export.
pBatchOptionsThe options for the export.
pExportModelsModels to the export.
Returns
True if the export succeeded.
Remarks
Not all options have to be set, only those that belong to process.

◆ FileImport()

bool FileImport ( FBString  pFilename,
bool  pMatchModels = false,
bool  pCreateUnmatchedModels = true 
)

Import a motion file.

Command File->Motion File Import... in the menus.

Parameters
pFilenameThe file to import. To import two files at the same time (ex: .amc & .asf), separate the two files path with a comma ("Path1,Path2").
pMatchModelsIf 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.
pCreateUnmatchedModelsWhether unmatched models will be created. This flag matters only when pMatchModels is true. when pMatchModels is false, all the models are created.
Returns
True if the import succeeded.
Remarks
No models selected, all the models in the scene will be checked for a potential name match.
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.
The data will be imported in the current take.
The last two parameter are only used for motion files.
For now, you cannot import custom file types.
Currently, only the default import options are used.
Warning
The signature of this function might change in the future to support import options.

◆ FileImportBatch()

bool FileImportBatch ( const char *  pName,
FBBatchOptions pBatchOptions,
FBModel pReference 
)

Import a motion file using batch options.

Import used for loading files in batch process.

Parameters
pNameThe name of the file without extension. Extension and path will be taken from batch options.
pBatchOptionsThe options for the import.
pReferenceReference model for the import.
Returns
True if the import succeeded.
Remarks
Not all options have to be set, only those that belong to process.

◆ FileImportWithOptions()

bool FileImportWithOptions ( FBMotionFileOptions pOptions)

Import a motion file with the ability to specify options.

Command File->Motion File Import... in the menus.

Parameters
pOptionsA FBMotionFileOptions object that contains the path to the files, as well as the options to load those motion files.
Returns
True if the import succeeded.
Remarks
The import will only work if you open files of the same type.
For now, you cannot import custom file types.
Not all options can be applied to a particular motion file type, please use the Motion File Import UI as a reference.

◆ FileMerge() [1/2]

bool FileMerge ( const char *  pFilename,
bool  pShowUIMsg = false,
FBFbxOptions pOptions = NULL 
)

Merge one or multiple files with the current scene.

Command File->Merge in the menus.

Parameters
pFilenameFile(s) to merge. For multiple files, use a list of files separated by '~'.
pShowUIMsgSet false if don't want to popup any UI dialog or messages (default=false).
pOptionsProvide 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.
Returns
true if successful.

◆ FileMerge() [2/2]

bool FileMerge ( FBStringList pPathlist,
bool  pShowUIMsg = false,
FBFbxOptions pOptions = NULL 
)

Merge multiple files with the current scene.

Command File->Merge in the menus.

Parameters
pPathlistFiles to merge.
pShowUIMsgSet false if don't want to popup any UI dialog or messages (default=false).
pOptionsProvide 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.
Returns
true if successful.

◆ FileNew()

bool FileNew ( bool  pAskUser = false,
bool  pClearSceneName = true 
)

Command File->New in the menus.

Parameters
pAskUserSet to true to cause a save dialog to popup. Default is false.
pClearSceneNameSet to true to clear the scene name, set to false to retain it. Default is true.
Returns
true if successful.

◆ FileOpen() [1/2]

bool FileOpen ( const char *  pFilename,
bool  pShowUIMsg = false,
FBFbxOptions pOptions = NULL 
)

Open a file, replacing the current scene.

Command File->Open in the menus.

Parameters
pFilenameFile to open.
pShowUIMsgSet false if don't want to popup any UI dialog or messages (default=false).
pOptionsProvide 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.
Returns
true if file open successfully.

◆ FileOpen() [2/2]

bool FileOpen ( void *  pBuffer,
kULong  pBufferLength 
)

Open a file from memory.

Warning
this is advanced & not supported function, use with caution.
Parameters
pBufferthe memory buffer for the file. Raw memory address is expected in Python.
pBufferLengththe memory buffer size.
Returns
true if file opened successfully.

◆ FileRender()

bool FileRender ( FBVideoGrabOptions pRenderOptions = NULL)

Render current scene to media file.

Command File->Render in the menus.

Parameters
pRenderOptionsThe options used when rendering the scene. If you don't specify them, current one are used.
Returns
True if the file was rendered successfully otherwise False and FBVideoGrabber.GetLastErrorMsg() contains the description of the error.
Remarks
Render options can be changed if they are not valid.
Warning
If the destination media file exist, it will be overwritten by default.

◆ FileSave()

bool FileSave ( const char *  pFilename = NULL,
FBFbxOptions pOptions = NULL 
)

Save the file under another name.

Command File->SaveAs in the menus.

Parameters
pFilenameSave file as pFilename. A value of NULL will use the current file name.
pOptionsProvide finer control on file save options (default=NULL)
Returns
true if successful.

◆ FlushEventQueue()

void 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).

◆ GetMaxFrameCount()

bool GetMaxFrameCount ( void *  pBuffer,
kULong  pBufferLength,
kLong *  pFrameCount,
int  pTimeScale 
)

Get max frame count from a scene file in memory.

Warning
this is advanced & not supported function, use with caution.
Parameters
pBufferthe memory buffer for the file. Raw memory address is expected in Python.
pBufferLengththe memory buffer size.
pFrameCount(C++ only) out parameter to hold max frame count.
pTimeScaleTime scale.
Returns
(C++ only) True if file opened successfully. (Python only) A tuple with 2 values: (bool return value, pFrameCount).

◆ GetSceneAuthor()

const char* GetSceneAuthor ( )

Return the scene author from the scene properties.

◆ GetSceneComment()

const char* GetSceneComment ( )

Return the scene comment from the scene properties.

◆ GetSceneKeywords()

const char* GetSceneKeywords ( )

Return the scene keywords from the scene properties.

◆ GetSceneRevisionNumber()

const char* GetSceneRevisionNumber ( )

Return the scene revision number from the scene properties.

◆ GetSceneSubject()

const char* GetSceneSubject ( )

Return the scene subject from the scene properties.

◆ GetSceneTitle()

const char* GetSceneTitle ( )

Return the scene title from the scene properties.

◆ IsSceneModified()

bool IsSceneModified ( )

Is the scene modified since last save / new scene creation?

Returns
True if the scene is modified since last save / new scene creation, false otherwise.

◆ IsValidBatchFile()

bool IsValidBatchFile ( const char *  pFilename)

Verify motion file readability.

Parameters
pFilenameThe file to test.
Returns
True if file was opened successfully (file is closed at the end).

◆ LoadAnimationOnCharacter()

bool LoadAnimationOnCharacter ( const char *  pFileName,
FBCharacter pCharacter,
FBFbxOptions pFbxOptions,
FBPlotOptions pPlotOptions 
)

Load a rig and its animation from a file.

Parameters
pFileNameFile name.
pCharacterTarget character.
pFbxOptionsThe options for the character rig and animation load
pPlotOptionsIf the animation should be plotted on the target rig, these plot options will be used. Set to NULL if animation will not be plotted.
Returns
true if successful.

◆ Maximize()

bool Maximize ( )

Maximize window (minimized).

Returns
Operation was successful (true or false).

◆ Minimize()

bool Minimize ( bool  pBlocking = true)

Minimize window.

Parameters
pBlockingIs the minimization blocking operation (default = true).
Returns
Operation was successful (true or false).

◆ OneClickAddToCurrentScene()

bool OneClickAddToCurrentScene ( )

Send the scene and add it to the current scene in the specified application.

Returns
True if transfer successful.

◆ OneClickIsConnectedTo()

FBOneClickApplication OneClickIsConnectedTo ( )

Return the other application that MotionBuilder is connected to.

Returns
The application that MotionBuilder is connected to.

◆ OneClickSelectPreviouslySentObject()

void OneClickSelectPreviouslySentObject ( )

Select, in MotionBuilder, the object that were sent.

◆ OneClickSendAsNewScene()

bool OneClickSendAsNewScene ( FBOneClickApplication  pApplication)

Send the current scene as a new scene in the specified application.

Parameters
pApplicationThe application that will receive the scene.
Returns
True if transfer successful.

◆ OneClickUpdateCurrentScene()

bool OneClickUpdateCurrentScene ( )

Send the scene to update the current scene in the specified application.

Returns
True if transfer successful.

◆ SaveCharacterRigAndAnimation()

bool SaveCharacterRigAndAnimation ( const char *  pFileName,
FBCharacter pCharacter,
FBFbxOptions pFbxOptions 
)

Save the rig and its animation in a file.

Parameters
pFileNameFile name.
pCharacterCharacter to save.
pFbxOptionsThe options for the character rig and animation export
Warning
After save, the current scene selection will be reset.

◆ SetSceneAuthor()

void SetSceneAuthor ( const char *  pAuthor)

Set the scene author.

Parameters
pAuthorThe author to set in the scene properties.

◆ SetSceneComment()

void SetSceneComment ( const char *  pComment)

Set the scene comment.

Parameters
pCommentThe comment to set in the scene properties.

◆ SetSceneKeywords()

void SetSceneKeywords ( const char *  pKeywords)

Set the scene keywords.

Parameters
pKeywordsThe keywords to set in the scene properties.

◆ SetSceneRevisionNumber()

void SetSceneRevisionNumber ( const char *  pRevNumber)

Set the scene revision number.

Parameters
pRevNumberThe revision number to set in the scene properties.

◆ SetSceneSubject()

void SetSceneSubject ( const char *  pSubject)

Set the scene subject.

Parameters
pSubjectThe subject to set in the scene properties.

◆ SetSceneTitle()

void SetSceneTitle ( const char *  pTitle)

Set the scene title.

Parameters
pTitleThe title to set in the scene properties.

◆ TheOne()

static FBApplication& TheOne ( )
static

Get the global object for this class.

Returns
the global object.

◆ UpdateAllWidgets()

void UpdateAllWidgets ( )

Request to refresh display of all UI widgets.

Member Data Documentation

◆ ApplicationState

FBPropertyApplicationState ApplicationState

Read Only Property: State the MotionBuilder application has been started in.

Definition at line 325 of file fbapplication.h.

◆ CurrentActor

FBPropertyActor 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.

Definition at line 601 of file fbapplication.h.

◆ CurrentCharacter

FBPropertyCharacter 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.

Definition at line 604 of file fbapplication.h.

◆ FBXFileName

FBPropertyString FBXFileName

Read Write Property: Current scene filename.

Definition at line 599 of file fbapplication.h.

◆ OnFileExit

FBPropertyEvent OnFileExit

Event: A File Exit as been requested, nothing has been destroyed yet.

Definition at line 334 of file fbapplication.h.

◆ OnFileMerge

FBPropertyEvent OnFileMerge

Event: A File Merge has been requested, nothing has been loaded yet.

Definition at line 331 of file fbapplication.h.

◆ OnFileNew

FBPropertyEvent OnFileNew

Event: A File New has been requested, nothing has been destroyed yet.

Definition at line 328 of file fbapplication.h.

◆ OnFileNewCompleted

FBPropertyEvent OnFileNewCompleted

Event: A File New has been completed.

Definition at line 327 of file fbapplication.h.

◆ OnFileOpen

FBPropertyEvent OnFileOpen

Event: A File Open has been requested, nothing has been loaded yet.

Definition at line 330 of file fbapplication.h.

◆ OnFileOpenCompleted

FBPropertyEvent OnFileOpenCompleted

Event: A File Open has been completed.

Definition at line 329 of file fbapplication.h.

◆ OnFileSave

FBPropertyEvent OnFileSave

Event: A File Save has been requested, nothing has been saved yet.

Definition at line 333 of file fbapplication.h.

◆ OnFileSaveCompleted

FBPropertyEvent OnFileSaveCompleted

Event: A File Save has been completed.

Definition at line 332 of file fbapplication.h.

◆ OnOverrideFileOpen

FBPropertyEventOverrideFileOpen OnOverrideFileOpen

Event: Called when a file is about to be opened/merged. The user can override the process with his own file import system.

Definition at line 336 of file fbapplication.h.


The documentation for this class was generated from the following file: