Open Reality Reference Guide
 
Loading...
Searching...
No Matches
Merge Transaction Optimization.

File Reference and scene assembly workflow load many small files which contain individual entities (model, material, texture, character, props and etc.,). More...

Enumerations

enum  FBConstantKeyReducerThresholdType {
  kFBTranslationThreshold ,
  kFBRotationThreshold ,
  kFBScalingThreshold ,
  kFBDefaultThreshold
}
 Different threshold types for the Constant Key Reducer filter. More...
 

Functions

K_DLLIMPORT void FBPreventUIUpdateBegin ()
 Call to prevent UI updates when creating/deleting/renaming objects.
 
K_DLLIMPORT void FBPreventUIUpdateEnd ()
 Call to end blocking the UI updates.
 
K_DLLIMPORT bool FBPreventUIUpdateIsOn ()
 Call to tell if UI updates are blocked.
 
K_DLLIMPORT void FBMergeTransactionBegin ()
 Call to begin the transaction for merging multiple files.
 
K_DLLIMPORT void FBMergeTransactionEnd ()
 Call to end the merge transaction.
 
K_DLLIMPORT bool FBMergeTransactionIsOn ()
 Call to tell if system is during Merge transaction.
 
K_DLLIMPORT void FBMergeTransactionFileRefEditBegin ()
 Call to begin the transaction for merging multiple files and applying File Reference edit at the same time.
 
K_DLLIMPORT void FBMergeTransactionFileRefEditEnd ()
 Call to end merge transaction with File Reference edit.
 
K_DLLIMPORT bool FBMergeTransactionFileRefEditIsOn ()
 Call to tell if system is during File Reference Edit Merge transaction.
 
K_DLLIMPORT double FBGetConstantKeyReducerThresholdValue (FBConstantKeyReducerThresholdType pThresholdType)
 Return a specific threshold value used by the Constant Key Reducer filter.
 
K_DLLIMPORT void FBSetConstantKeyReducerThresholdValue (FBConstantKeyReducerThresholdType pThresholdType, double pValue)
 Set a specific threshold value used by the Constant Key Reducer filter.
 

Detailed Description

File Reference and scene assembly workflow load many small files which contain individual entities (model, material, texture, character, props and etc.,).

And it's a quite time consuming process with normal workflow. The following set of merge transaction functions could be used to improve the performance effectively.

A single file load / merge operation mainly includes the following three major stages:

  1. Loading file from disk to memory;
  2. Translate/interpret the file content into the application scene object models;
  3. Post processing (scene object preparation, UI refresh and etc).

The last step (post processing) often is quite heavy. With the merge transaction, however this step could be executed only once for multiple consecutive file merge operations. for example: [code] MergeTransacionBegin() File_Merge(filepath1) File_Merge(filepath1) File_Merge(filepath1) ... MergeTransactionEnd() [/code] This Merge Transaction could be nested.

Enumeration Type Documentation

◆ FBConstantKeyReducerThresholdType

Different threshold types for the Constant Key Reducer filter.

Enumerator
kFBTranslationThreshold 

Translation threshold.

kFBRotationThreshold 

Rotation threshold.

kFBScalingThreshold 

Scaling threshold.

kFBDefaultThreshold 

All other curves threshold.

Definition at line 754 of file fbapplication.h.

Function Documentation

◆ FBGetConstantKeyReducerThresholdValue()

K_DLLIMPORT double FBGetConstantKeyReducerThresholdValue ( FBConstantKeyReducerThresholdType  pThresholdType)

Return a specific threshold value used by the Constant Key Reducer filter.

Parameters
pThresholdTypeThe threshold type to retrieve its value.
Returns
The threshold value.

◆ FBMergeTransactionBegin()

K_DLLIMPORT void FBMergeTransactionBegin ( )

Call to begin the transaction for merging multiple files.

Useful to consecutively merge multiple files into scene.

Note
The transaction need to be closed by calling FBMergeTransactionEnd(). There is no need to call FBPreventUIUpdateBegin() with this function, since it already contains the same optimization.

◆ FBMergeTransactionEnd()

K_DLLIMPORT void FBMergeTransactionEnd ( )

Call to end the merge transaction.

◆ FBMergeTransactionFileRefEditBegin()

K_DLLIMPORT void FBMergeTransactionFileRefEditBegin ( )

Call to begin the transaction for merging multiple files and applying File Reference edit at the same time.

Useful to consecutively merge multiple files into scene with FileRef edit operation in between.

Note
The transaction need to be closed by calling FBMergeTransactionFileRefEditEnd().

◆ FBMergeTransactionFileRefEditEnd()

K_DLLIMPORT void FBMergeTransactionFileRefEditEnd ( )

Call to end merge transaction with File Reference edit.

◆ FBMergeTransactionFileRefEditIsOn()

K_DLLIMPORT bool FBMergeTransactionFileRefEditIsOn ( )

Call to tell if system is during File Reference Edit Merge transaction.

◆ FBMergeTransactionIsOn()

K_DLLIMPORT bool FBMergeTransactionIsOn ( )

Call to tell if system is during Merge transaction.

◆ FBPreventUIUpdateBegin()

K_DLLIMPORT void FBPreventUIUpdateBegin ( )

Call to prevent UI updates when creating/deleting/renaming objects.

Useful to speed up script operations. Previously, FBMergeTransactionBegin()/ FBMergeTransactionEnd() could be used to do this kind of optimization, even if no merge operations were done. However, using FBMergeTransactionBegin()/ FBMergeTransactionEnd() with non-merge operation could lead to issues, like objects with invalid namespaces. FBPreventUIUpdateBegin()/FBPreventUIUpdateEnd() fix this issue, while giving the same speed increase.

Note
The transaction need to be closed by calling FBPreventUIUpdateEnd(). There is no need to call this function when using FBMergeTransactionBegin(), since FBMergeTransactionBegin() already has the same optimization.

◆ FBPreventUIUpdateEnd()

K_DLLIMPORT void FBPreventUIUpdateEnd ( )

Call to end blocking the UI updates.

◆ FBPreventUIUpdateIsOn()

K_DLLIMPORT bool FBPreventUIUpdateIsOn ( )

Call to tell if UI updates are blocked.

◆ FBSetConstantKeyReducerThresholdValue()

K_DLLIMPORT void FBSetConstantKeyReducerThresholdValue ( FBConstantKeyReducerThresholdType  pThresholdType,
double  pValue 
)

Set a specific threshold value used by the Constant Key Reducer filter.

Parameters
pThresholdTypeThe threshold type to set its value.
pValueThe new threshold value to set.