File Reference and scene assembly workflow load many small files which contain individual entities (model, material, texture, character, props and etc.,).
This section describes the functions provided for saving HumanIK objects to files on disk, and for loading HumanIK objects into memory from saved files.
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:
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.
See also ~{ Saving and Loading HumanIK Objects }~.
Functions | |
void | FBPreventUIUpdateBegin () |
Call to prevent UI updates when creating/deleting/renaming objects. More... | |
void | FBPreventUIUpdateEnd () |
Call to end blocking the UI updates. More... | |
bool | FBPreventUIUpdateIsOn () |
Call to tell if UI updates are blocked. More... | |
void | FBMergeTransactionBegin () |
Call to begin the transaction for merging multiple files. More... | |
void | FBMergeTransactionEnd () |
Call to end the merge transaction. More... | |
bool | FBMergeTransactionIsOn () |
Call to tell if system is during Merge transaction. More... | |
void | FBMergeTransactionFileRefEditBegin () |
Call to begin the transaction for merging multiple files and applying File Reference edit at the same time. More... | |
void | FBMergeTransactionFileRefEditEnd () |
Call to end merge transaction with File Reference edit. More... | |
bool | FBMergeTransactionFileRefEditIsOn () |
Call to tell if system is during File Reference Edit Merge transaction. More... | |
HIKCharacter * | HIKLoadCharacter (const char *pFileName, const char *pValidationString, HIKMalloc pMalloc) |
Load file pFileName , and create an HIKCharacter object from its contents. More... | |
bool | HIKSaveCharacter (const char *pFileName, HIKCharacter *pCharacter, HIKMalloc pMalloc, HIKFree pFree, float pUnitScale=1.0f) |
Save HIKCharacter pCharacter to file pFileName . More... | |
HIKCharacterState * | HIKLoadCharacterState (const char *pFileName, HIKCharacter *pCharacter, HIKMalloc pMalloc) |
Load file pFileName , and create an HIKCharacterState object from its contents. More... | |
bool | HIKSaveCharacterState (const char *pFileName, HIKCharacter *pCharacter, HIKCharacterState *pState, int pTransformMode, float pUnitScale=1.0f) |
Save HIKCharacterState pState to file pFileName . More... | |
HIKEffectorSetState * | HIKLoadEffectorState (const char *pFileName, HIKMalloc pMalloc) |
Load file pFileName , and create an HIKEffectorSetState object from its contents. More... | |
bool | HIKSaveEffectorState (const char *pFileName, HIKEffectorSetState *pState, float pUnitScale=1.0f) |
Save HIKEffectorSetState pState to file pFileName . More... | |
HIKPropertySetState * | HIKLoadPropertySetState (const char *pFileName, HIKMalloc pMalloc) |
Load file pFileName , and create an HIKPropertySetState object from its contents. More... | |
bool | HIKSavePropertySetState (const char *pFileName, HIKPropertySetState *pState, float pUnitScale=1.0f) |
Save HIKPropertySetState pState to file pFileName . More... | |
void * | HIKLoadDataBlock (const char *pFileName, HIKDataDescription &pDataDesc, HIKMalloc pMalloc) |
Load file pFileName , and create a data set from its contents according to the data description provided in the pDataDesc argument. More... | |
void * | HIKDefaultAlignedMalloc (size_t pSize, size_t pAlignment, HIKMalloc pMalloc) |
Allocates a data block aligned to the pAlignment pointer boundary. More... | |
void | HIKDefaultAlignedFree (void *pAligned, HIKFree pFree) |
Frees a data block allocated using HIKDefaultAlignedMalloc(). More... | |
void | HIKSaveDataBlock (const char *pFileName, const HIKDataDescription &pDataDesc, const void *pDataBlock) |
Save the data set located in memory at pDataBlock to file pFileName . More... | |
void ORSDK2019::FBMergeTransactionBegin | ( | ) |
Call to begin the transaction for merging multiple files.
Useful to consecutively merge multiple files into scene.
void ORSDK2019::FBMergeTransactionEnd | ( | ) |
Call to end the merge transaction.
void ORSDK2019::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.
void ORSDK2019::FBMergeTransactionFileRefEditEnd | ( | ) |
Call to end merge transaction with File Reference edit.
bool ORSDK2019::FBMergeTransactionFileRefEditIsOn | ( | ) |
Call to tell if system is during File Reference Edit Merge transaction.
bool ORSDK2019::FBMergeTransactionIsOn | ( | ) |
Call to tell if system is during Merge transaction.
void ORSDK2019::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.
void ORSDK2019::FBPreventUIUpdateEnd | ( | ) |
Call to end blocking the UI updates.
bool ORSDK2019::FBPreventUIUpdateIsOn | ( | ) |
Call to tell if UI updates are blocked.
|
inline |
Frees a data block allocated using HIKDefaultAlignedMalloc().
pAligned | Pointer allocated using HIKDefaultAlignedMalloc(). |
pFree | Pointer to a memory de-allocation function. If you do not have a custom memory de-allocation function, use &free. |
Allocates a data block aligned to the pAlignment pointer boundary.
This allocator is used in HIKSaveDataBlock() to align the resulting dataset to 16 bytes.
pSize | Size of the block of data to allocate. |
pAlignment | Required address alignment. |
pMalloc | Pointer to a memory allocation function. If you do not have a custom memory allocation function, use &malloc. |
Definition at line 846 of file hikdump.h.
|
inline |
Load file pFileName
, and create an HIKCharacter object from its contents.
pFileName | Path and file name of the file to load. |
pValidationString | The customer identification string given to you by Autodesk to license the use of HumanIK in your project. |
pMalloc | Pointer to a memory allocation function. If you do not have a custom memory allocation function, use &malloc. |
Definition at line 353 of file hikdump.h.
|
inline |
Load file pFileName
, and create an HIKCharacterState object from its contents.
pFileName | Path and file name of the file to load. |
pCharacter | HIKCharacter used to create the HIKCharacterState loaded from the file. |
pMalloc | Pointer to a memory allocation function. If you do not have a custom memory allocation function, use &malloc. |
Definition at line 483 of file hikdump.h.
|
inline |
Load file pFileName
, and create a data set from its contents according to the data description provided in the pDataDesc
argument.
For more information about data sets, see ~{ Setting and Retrieving Animation Data }~.
pFileName | Path and file name of the file to load. |
pDataDesc | Data description that defines the memory layout of the data set contained in the file. |
pMalloc | Pointer to a memory allocation function. If you do not have a custom memory allocation function, use &malloc. |
Definition at line 863 of file hikdump.h.
|
inline |
Load file pFileName
, and create an HIKEffectorSetState object from its contents.
pFileName | Path and file name of the file to load. |
pMalloc | Pointer to a memory allocation function. If you do not have a custom memory allocation function, use &malloc. |
Definition at line 611 of file hikdump.h.
|
inline |
Load file pFileName
, and create an HIKPropertySetState object from its contents.
pFileName | Path and file name of the file to load. |
pMalloc | Pointer to a memory allocation function. If you do not have a custom memory allocation function, use &malloc. |
Definition at line 719 of file hikdump.h.
|
inline |
Save HIKCharacter pCharacter
to file pFileName
.
Where possible, it is recommended that you use the HIKWriteToStream() function to export your HIKCharacter instead, as it saves more information about your character. See HIKWriteToStream() and HIKReadFromStream().
pFileName | Path and file name of the file to create. If the file already exists, it is overwritten. |
pCharacter | HIKCharacter to be saved. |
pMalloc | Pointer to a memory allocation function. If you do not have a custom memory allocation function, use &malloc. |
pFree | Pointer to a memory de-allocation function. If you do not have a custom memory de-allocation function, use &free. |
Definition at line 393 of file hikdump.h.
|
inline |
Save HIKCharacterState pState
to file pFileName
.
pFileName | Path and file name of the file to create. If the file already exists, it is overwritten. |
pCharacter | The HIKCharacter used to create the HIKCharacterState being saved. |
pState | HIKCharacterState to save. |
pTransformMode | Determines whether the Node transforms in the saved HIKCharacterState will be expressed in global space or local space. 0 = global space, 1 = local space. |
Definition at line 508 of file hikdump.h.
|
inline |
Save the data set located in memory at pDataBlock
to file pFileName
.
For more information about data sets, see ~{ Setting and Retrieving Animation Data }~.
pFileName | Path and file name of the file to create. If the file already exists, it is overwritten. |
pDataDesc | Data description that defines the memory layout of the data set to be saved. |
pDataBlock | Pointer to the beginning of the data set in memory. |
Definition at line 892 of file hikdump.h.
|
inline |
Save HIKEffectorSetState pState
to file pFileName
.
pFileName | Path and file name of the file to create. If the file already exists, it is overwritten. |
pState | HIKEffectorSetState to save. |
Definition at line 644 of file hikdump.h.
|
inline |
Save HIKPropertySetState pState
to file pFileName
.
pFileName | Path and file name of the file to create. If the file already exists, it is overwritten. |
pState | HIKPropertySetState to save. |
Definition at line 741 of file hikdump.h.