FBX C++ API Reference
FbxIO Class Reference

#include <fbxio.h>

Class Description

FbxIO represents an FBX file.

It is primarily used by FBX importers (FbxImporter) and exporter (FbxExporter) when reading or writing data from or to a disk or memory. Most users will not use the FbxIO class directly but will use an instance of either FbxImporter or FbxExporter to read or write FBX files.

An FBX file may contain binary data or ASCII data. A good way to learn the internal structure of a FBX file is to open a FBX file saved in ASCII in a text editor.

Ex: to read a FBX file content using FbxIO class directly

// Create a FbxIO object with FbxIO::Create()
// Open the file with ProjectOpen( ... ) a NULL pointer can be passed for (FbxReader)* param
// ProjectOpen_xxx_Section() to open a particular section
int nbSec = FieldGetCount(); // to get the number of fields of the current section opened
for(int i=0; i < nbSec; i++) // read all fields
{
// check if the field is a block
if(FieldReadIsBlock()){ } ... Read sub fields recursively ... may contain other blocks and fields
else
{
FieldReadBegin(); // navigate on the field
char fieldType = FieldReadGetType(); // get the data type
// According to the Field data type, call the appropriate read functions
if(fieldType == 'S') FieldReadS(...) to read a string
else if(fieldType == 'B') FieldReadB(...) to read a bool
else if(fieldType == 'I') FieldReadI(...) to read a int
...
FieldReadEnd(); // navigate to next field
}
}
ProjectCloseSection() // close the section opened
// repeat for another section ...
// finally close the Project
ProjectClose(); // or delete the FbxIO object created.

Definition at line 325 of file fbxio.h.

Classes

struct  FbxAutoResetXRefManager
 

Public Types

enum  BinaryType { BinaryNormal, BinaryLarge }
 

Public Member Functions

 FbxIO (BinaryType pBinaryType, FbxStatus &pStatus)
 Default constructor. More...
 
virtual ~FbxIO ()
 Destructor. More...
 
virtual bool FieldReadEmbeddedFile (FbxString &pFileName, FbxString &pRelativeFileName, const char *pEmbeddedMediaDirectory="", bool *pIsFileCreated=((void *) 0))
 Read field and copy it into a file. More...
 
const double * FieldReadArrayD (int &pCount)
 Read the whole array and return the pointer to it. More...
 
const float * FieldReadArrayF (int &pCount)
 Read the whole array and return the pointer to it. More...
 
const int * FieldReadArrayI (int &pCount)
 Read the whole array and return the pointer to it. More...
 
const FbxLongLongFieldReadArrayLL (int &pCount)
 Read the whole array and return the pointer to it. More...
 
const bool * FieldReadArrayB (int &pCount)
 Read the whole array and return the pointer to it. More...
 
const FbxUCharFieldReadArrayBytes (int &pCount)
 Read the whole array and return the pointer to it. More...
 
const int * FieldReadArray (int &pCount, const int *)
 Read the whole array and return the pointer to it. More...
 
const float * FieldReadArray (int &pCount, const float *)
 Read the whole array and return the pointer to it. More...
 
const double * FieldReadArray (int &pCount, const double *)
 Read the whole array and return the pointer to it. More...
 
const FbxLongLongFieldReadArray (int &pCount, const FbxLongLong *)
 Read the whole array and return the pointer to it. More...
 
const bool * FieldReadArray (int &pCount, const bool *)
 Read the whole array and return the pointer to it. More...
 
const FbxUCharFieldReadArray (int &pCount, const FbxUChar *)
 Read the whole array and return the pointer to it. More...
 
int GetFieldRMaxChunkSize () const
 ASCII files may limit how big you can write your raw data, forcing you to break it down into chunks. More...
 
void FieldWriteObjectReference (const char *pName)
 Write object reference pName in the current field. More...
 
void FieldWriteObjectReference (const char *pFieldName, const char *pName)
 Write object reference pName in field pFieldName. More...
 
bool FieldWriteEmbeddedFile (FbxString pFileName, FbxString pRelativeFileName)
 Write field with file content as a value. More...
 
void WriteComments (const char *pFieldName)
 Write comments, only effective in ASCII mode. More...
 
bool GetHaveLoadedEmbededFile () const
 Get if the embedded file is currently loaded. More...
 
void GetMemoryFileInfo (void **pMemPtr, size_t &pSize) const
 Get the maximum byte count written. More...
 
bool IsBeforeVersion6 () const
 Get a internal flag to manage pre FBX version 6 data format Used for backwards compatibility. More...
 
void SetIsBeforeVersion6 (bool pIsBeforeVersion6)
 Set a internal flag to manage pre FBX version 6 data format Used for backwards compatibility. More...
 
Project Global

The term "Project" here is an abstract name chosen to represent a group of data ex: a file, a stream, a memory buffer, etc.

bool ProjectOpen (void *pAddress, FbxULong pMaxLength, FbxReader *pReader, bool pCheckCRC=false, bool pOpenMainSection=true, FbxIOFileHeaderInfo *pFileHeaderInfo=((void *) 0))
 Open a project already in Memory. More...
 
bool ProjectOpen (const char *pName, FbxReader *pReader, bool pCheckCRC=false, bool pOpenMainSection=true, FbxIOFileHeaderInfo *pFileHeaderInfo=((void *) 0))
 Open a project. More...
 
bool ProjectOpen (FbxStream *pStream, void *pStreamData, FbxReader *pReader, bool pCheckCRC=false, bool pOpenMainSection=true, FbxIOFileHeaderInfo *pFileHeaderInfo=((void *) 0))
 Open a project. More...
 
bool ProjectOpenDirect (const char *pName, FbxReader *pReader, bool pCheckCRC=false, bool pOpenMainSection=true, FbxIOFileHeaderInfo *pFileHeaderInfo=((void *) 0))
 Open project file without necessarily an .fbx extension. More...
 
bool ProjectCreate (void *pAddress, FbxUInt pSize, FbxWriter *pWriter, bool pBinary, bool pEncrypted, FbxIOFileHeaderInfo *pFileHeaderInfo=((void *) 0))
 Create a project in Memory. More...
 
bool ProjectCreate (const char *pName, FbxWriter *pWriter, bool pBinary, bool pEncrypted, FbxIOFileHeaderInfo *pFileHeaderInfo=((void *) 0))
 Create a project. More...
 
bool ProjectCreate (FbxStream *pStream, void *pStreamData, FbxWriter *pWriter, bool pBinary, bool pEncrypted, FbxIOFileHeaderInfo *pFileHeaderInfo=((void *) 0))
 Create a project. More...
 
bool ProjectCreateDirect (const char *pName, FbxWriter *pWriter, bool pBinary, bool pEncrypted, FbxIOFileHeaderInfo *pFileHeaderInfo=((void *) 0))
 Create a project without necessary an .fbx extension. More...
 
bool ProjectCreateEmpty (const char *pName, FbxWriter *pWriter, int pVersion, bool pBinary, bool pEncrypted)
 Create a project, without writing out the header (yet) More...
 
bool ProjectCreateEmpty (FbxStream *pStream, void *pStreamData, FbxWriter *pWriter, int pVersion, bool pBinary, bool pEncrypted)
 Create a project, without writing out the header (yet) More...
 
bool ProjectWrite_BeginFileHeader ()
 Write FBX signature at the top of the file, prepare file for writing header information. More...
 
bool ProjectWrite_BeginExtendedHeader ()
 Open up the 'extended header'. More...
 
bool ProjectWrite_WriteExtendedHeader (const FbxIOFileHeaderInfo *pExtendedHeader)
 Write the contents of the extended header. More...
 
bool ProjectWrite_EndExtendedHeader ()
 Close the extended header. More...
 
bool ProjectWrite_EndFileHeader ()
 Close up the header, prepare file for payload write. More...
 
bool ProjectClose (void **pData=0, size_t *pSize=0)
 Close the project. More...
 
void ProjectSetXRefManager (const FbxXRefManager *)
 Provide the XRef Manager to use to create the .fbm folder. More...
 
const FbxXRefManagerProjectGetXRefManager () const
 Get the XRef Manager to use. More...
 
bool ProjectCreateEmbeddedFolder (const FbxXRefManager &pXRefManager, FbxString &pCreatedFolder, const char *pUserDefinedFolder=((void *) 0))
 Select (and create) a folder to store embedded files (the .fbm file folder). More...
 
void SetEmbedded (bool pValue)
 On store event, use this function to tell if we are embedding. More...
 
void SetEmbeddingExtractionFolder (const char *pExtractionFolder)
 Explicitly set the embedding extraction folder. More...
 
const char * GetEmbeddingExtractionFolder ()
 Retrieve the current folder destination where the embedded files will be extracted. More...
 
bool IsEmbedded () const
 Check if file is embedded or not. More...
 
bool IsBinary () const
 Check if file is binary or ASCII. More...
 
bool IsEncrypted () const
 Return if binary file is encrypted. More...
 
bool CheckCRC ()
 Check CRC code. More...
 
FbxUInt32 GetFileVersionNumber () const
 Return the file version number. More...
 
void CacheSize (FbxUInt32 pCacheSize)
 Set the cache size for accelerated IO. More...
 
FbxUInt32 CacheSize () const
 Return the current cache size. More...
 
FBX 7 Format specific functions.

The FBX 7 format can compress internal arrays to make the file smaller.

The writer may decide not to compress all arrays, or it may even decide not to compress anyway. Flags are written in the file to help the FBX7 reader to know if a decompression is required, on a per-array basis. The following functions address specific topics of the FBX 7 file format.

bool Fbx7Support () const
 
void Fbx7Support (bool pSupport)
 Set the flag state to tell the parser to handle FBX7 files. More...
 
bool CompressArrays () const
 
void CompressArrays (bool pCompress)
 Set the flag state. More...
 
int CompressMinimumSize () const
 
void CompressMinimumSize (int pSize)
 Set the compression minimum size. More...
 
int CompressLevel () const
 
void CompressLevel (int pLevel)
 Set the compression level. More...
 
Directory related functions used to get or set file path information.
const char * GetFilename () const
 Get project file name. More...
 
FbxString GetDataDirectory (bool pAutoCreate=true)
 Get project data directory name. More...
 
FbxString GetMediaDirectory (bool pCreate=false, const char *pUserDefinedFolder=((void *) 0))
 Get the current embedded folder used by this object. More...
 
FbxString GetContainerTemplateDirectory (const char *pTemplateName, bool pCreate)
 Get the full path of the directory to extract the template file. More...
 
char * GetRelativePath (const char *pPath)
 Get the path relative to project directory. More...
 
char * GetRelativeFilePath (const char *pFilePath)
 Get the file path relative to project directory. More...
 
char * GetFullPath (const char *pRelativePath)
 Get the full path of path relative to project directory. More...
 
char * GetFullFilePath (const char *pRelativeFilePath)
 Get the full file path of path relative to project directory. More...
 
char * GetTmpProjectName (const char *pName) const
 Get the temporary project name. More...
 
bool SwapFromTmpProject (const char *pName, char *pError=((void *) 0), int pErrorSize=0)
 Swap from temporary project. More...
 
Read related functions used to get information of a field or a group of fields.
 Can be used to get the field content data or to navigate from field to field.
void FieldReadResetPosition ()
 Reset the field read position. More...
 
int FieldGetCount () const
 Get the number of fields. More...
 
const char * FieldGetName (int pFieldIndex) const
 Get the name of field indexed pFieldIndex. More...
 
int FieldGetInstanceCount (const char *pFieldName) const
 Get number of instance field pFieldName has. More...
 
bool FieldReadBegin (int pFieldIndex, int pInstance)
 Start to read field instance referred by field indexed pFieldIndex, instance indexed pInstance. More...
 
bool FieldReadBegin (const char *pFieldName)
 Start to read field pFieldName. More...
 
bool FieldReadBegin (const char *pFieldName, int pInstance)
 Start to read field instance referred field pFieldName, instance indexed pInstance. More...
 
void FieldReadEnd ()
 Stop to read the current field. More...
 
bool FieldReadIsBlock ()
 Return if current field is a block. More...
 
bool FieldReadBlockBegin ()
 Start to read a field block. More...
 
void FieldReadBlockEnd ()
 Stop to read a field block. More...
 
int FieldReadGetCount () const
 Return the number of read field. More...
 
int FieldReadGetRemain () const
 Return the number of field remaining to be read. More...
 
char FieldReadGetType () const
 Return current field value type. More...
 
char FieldReadCH ()
 Return current field value as a char. More...
 
char FieldReadCH (const char *pFieldName, char pDefault=0)
 Return field pFieldName's value as a char. More...
 
const char * FieldReadC ()
 Return current field value as a char pointer. More...
 
const char * FieldReadC (const char *pFieldName, const char *pDefault="")
 Return field pFieldName's value as a char pointer. More...
 
const char * FieldReadS ()
 Return current field value as a string (a char pointer). More...
 
const char * FieldReadS (const char *pFieldName, const char *pDefault="")
 Return field pFieldName's value as a char pointer. More...
 
bool FieldReadB ()
 Return current field value as an bool. More...
 
bool FieldReadB (const char *pFieldName, bool pDefault=false)
 Return field pFieldName's value as an integer. More...
 
int FieldReadI ()
 Return current field value as an integer. More...
 
int FieldReadI (const char *pFieldName, int pDefault=0)
 Return field pFieldName's value as an integer. More...
 
FbxLongLong FieldReadLL ()
 Return current field value as an integer. More...
 
FbxLongLong FieldReadLL (const char *pFieldName, FbxLongLong pDefault=0)
 Return field pFieldName's value as an integer. More...
 
float FieldReadF ()
 Return current field value as a float. More...
 
float FieldReadF (const char *pFieldName, float pDefault=0)
 Return field pFieldName's value as a float. More...
 
double FieldReadD ()
 Return current field value as a double. More...
 
double FieldReadD (const char *pFieldName, double pDefault=0)
 Return field pFieldName's value as a double. More...
 
FbxTime FieldReadT (const char *pFieldName)
 Return field pFieldName's value as a time value. More...
 
FbxTime FieldReadT ()
 Return field pFieldName's value as a time value. More...
 
FbxTimeSpan FieldReadTS (const char *pFieldName)
 Return field pFieldName's value as a timespan value. More...
 
FbxTimeSpan FieldReadTS ()
 Return field pFieldName's value as a timespan value. More...
 
void FieldReadFn (float *pValue, FbxUInt pn)
 Return current field value as a n floats array. More...
 
void FieldRead3F (float *pValue)
 Return current field value as a 3 floats array. More...
 
void FieldRead4F (float *pValue)
 Return current field value as a 4 floats array. More...
 
void FieldReadFn (const char *pFieldName, float *pValue, const float *pDefault, FbxUInt pn)
 Return field pFieldName's value as n floats array. More...
 
void FieldRead3F (const char *pFieldName, float *pValue, const float *pDefault=((void *) 0))
 Return field pFieldName's value as 4 floats array. More...
 
void FieldRead4F (const char *pFieldName, float *pValue, const float *pDefault=((void *) 0))
 Return field pFieldName's value as 3 floats array. More...
 
void FieldReadDn (double *pValue, FbxUInt pn)
 Return current field value as a n doubles array. More...
 
void FieldRead3D (double *pValue)
 Return current field value as a 3 doubles array. More...
 
void FieldRead4D (double *pValue)
 Return current field value as a 4 doubles array. More...
 
void FieldReadDn (const char *pFieldName, double *pValue, const double *pDefault, FbxUInt pn)
 Return field pFieldName's value as n doubles array. More...
 
void FieldRead3D (const char *pFieldName, double *pValue, const double *pDefault=((void *) 0))
 Return field pFieldName's value as 4 doubles array. More...
 
void FieldRead4D (const char *pFieldName, double *pValue, const double *pDefault=((void *) 0))
 Return field pFieldName's value as 3 doubles array. More...
 
void * FieldReadR (int *pByteSize)
 Return current field value as raw data. More...
 
void * FieldReadR (const char *pFieldName, int *pByteSize)
 Return field pFieldName's value as raw data. More...
 
FBX SDK 2009.3 and later
FbxChar FieldReadByte ()
 Return field pFieldName's value as byte. More...
 
FbxChar FieldReadByte (const char *pFieldName, FbxChar pDefault=0)
 Return field pFieldName's value as a byte value. More...
 
FbxUChar FieldReadUByte ()
 Return field pFieldName's value as unsigned byte. More...
 
FbxUChar FieldReadUByte (const char *pFieldName, FbxUChar pDefault=0)
 Return field pFieldName's value as an unsigned byte value. More...
 
FbxShort FieldReadShort ()
 Return field pFieldName's value as short. More...
 
FbxShort FieldReadShort (const char *pFieldName, FbxShort pDefault=0)
 Return field pFieldName's value as a short value. More...
 
FbxUShort FieldReadUShort ()
 Return field pFieldName's value as unsigned short. More...
 
FbxUShort FieldReadUShort (const char *pFieldName, FbxUShort pDefault=0)
 Return field pFieldName's value as an unsigned short value. More...
 
unsigned int FieldReadUI ()
 Return field pFieldName's value as unsigned integer. More...
 
unsigned int FieldReadUI (const char *pFieldName, unsigned int pDefault=0)
 Return field pFieldName's value as an unsigned int as a value. More...
 
FbxULongLong FieldReadULL ()
 Return field pFieldName's value as 64 bit unsigned integer. More...
 
FbxULongLong FieldReadULL (const char *pFieldName, FbxULongLong pDefault=0)
 Return field pFieldName's value as an 64 bit unsigned int as a value. More...
 
const FbxCharFieldReadArraySBytes (int &pCount)
 Read the whole array and return the pointer to it. More...
 
const FbxShortFieldReadArrayShort (int &pCount)
 Read the whole array and return the pointer to it. More...
 
const FbxUShortFieldReadArrayUShort (int &pCount)
 Read the whole array and return the pointer to it. More...
 
const unsigned int * FieldReadArrayUI (int &pCount)
 Read the whole array and return the pointer to it. More...
 
const FbxULongLongFieldReadArrayULL (int &pCount)
 Read the whole array and return the pointer to it. More...
 
const FbxCharFieldReadArray (int &pCount, const FbxChar *)
 Read the whole array and return the pointer to it. More...
 
const FbxShortFieldReadArray (int &pCount, const FbxShort *)
 Read the whole array and return the pointer to it. More...
 
const FbxUShortFieldReadArray (int &pCount, const FbxUShort *)
 Read the whole array and return the pointer to it. More...
 
const unsigned int * FieldReadArray (int &pCount, const unsigned int *)
 Read the whole array and return the pointer to it. More...
 
const FbxULongLongFieldReadArray (int &pCount, const FbxULongLong *)
 Read the whole array and return the pointer to it. More...
 
void FieldWriteByte (FbxChar pValue)
 Write field value as byte. More...
 
void FieldWriteByte (const char *pFieldName, FbxChar pValue)
 Write field pFieldName field with a byte value. More...
 
void FieldWriteUByte (FbxUChar pValue)
 Write field value as unsigned byte. More...
 
void FieldWriteUByte (const char *pFieldName, FbxUChar pValue)
 Write field pFieldName field with an unsigned byte value. More...
 
void FieldWriteShort (FbxShort pValue)
 Write field value as short. More...
 
void FieldWriteShort (const char *pFieldName, FbxShort pValue)
 Write field pFieldName field with a short value. More...
 
void FieldWriteUShort (FbxUShort pValue)
 Write field value as unsigned short. More...
 
void FieldWriteUShort (const char *pFieldName, FbxUShort pValue)
 Write field pFieldName field with an unsigned short value. More...
 
void FieldWriteUI (unsigned int pValue)
 Write field value as an unsigned integer. More...
 
void FieldWriteUI (const char *pFieldName, unsigned int pValue)
 Write field pFieldName field with an unsigned int as a value. More...
 
void FieldWriteULL (FbxULongLong pValue)
 Write field value as 64 bit unsigned integer. More...
 
void FieldWriteULL (const char *pFieldName, FbxULongLong pValue)
 Write field pFieldName field with an 64 bit unsigned int as a value. More...
 
void FieldWriteArraySBytes (int n, const FbxChar *pValue, int pSize=1, int pStride=0)
 Write array to file. More...
 
void FieldWriteArrayShort (int n, const FbxShort *pValue, int pSize=1, int pStride=0)
 Write array to file. More...
 
void FieldWriteArrayUShort (int n, const FbxUShort *pValue, int pSize=1, int pStride=0)
 Write array to file. More...
 
void FieldWriteArrayUI (int n, const unsigned int *pValue, int pSize=1, int pStride=0)
 Write array to file. More...
 
void FieldWriteArrayULL (int n, const FbxULongLong *pValue, int pSize=1, int pStride=0)
 Write array to file. More...
 
Write related functions used to write information of a field or a group of fields.
 Can be used to write the field content data or to navigate from field to field.
void FieldWriteBegin (const char *pFieldName)
 Start to write a field called pFieldName. More...
 
void FieldWriteEnd ()
 Stop to write the current field. More...
 
void FieldWriteBlockBegin ()
 Start to write a field block. More...
 
void FieldWriteObjectBegin (const char *pObjectType, const char *pName, const char *pSubType=((void *) 0))
 Start to write an object reference field. More...
 
void FieldWriteObjectEnd ()
 Stop to write an object reference field. More...
 
void FieldWriteBlockBegin (const char *pFileName)
 Start to write a field block in file pFileName. More...
 
void FieldWriteBlockEnd ()
 Stop to write a block of field. More...
 
void FieldWriteCH (char pValue)
 Write field value as a char. More...
 
void FieldWriteCH (const char *pFieldName, char pValue)
 Write field pFieldName field with a char as a value. More...
 
void FieldWriteC (const char *pValue)
 Write field value as char pointer pValue. More...
 
void FieldWriteC (const char *pFieldName, const char *pValue)
 Write field pFieldName with a char pointer as a value. More...
 
void FieldWriteS (const char *pValue)
 Write field value as FbxString pValue. More...
 
void FieldWriteS (const FbxString &pValue)
 Write field value as FbxString pValue. More...
 
void FieldWriteS (const char *pFieldName, const char *pValue)
 Write field pFieldName field with a FbxString as a value. More...
 
void FieldWriteS (const char *pFieldName, const FbxString &pValue)
 Write field pFieldName field with a FbxString as a value. More...
 
void FieldWriteB (bool pValue)
 Write field value as bool. More...
 
void FieldWriteB (const char *pFieldName, bool pValue)
 Write field pFieldName field with a bool value. More...
 
void FieldWriteI (int pValue)
 Write field value as integer. More...
 
void FieldWriteI (const char *pFieldName, int pValue)
 Write field pFieldName field with an int as a value. More...
 
void FieldWriteLL (FbxLongLong pValue)
 Write field value as 64 bit integer. More...
 
void FieldWriteLL (const char *pFieldName, FbxLongLong pValue)
 Write field pFieldName field with an 64 bit int as a value. More...
 
void FieldWriteF (float pValue)
 Write field value as float. More...
 
void FieldWriteF (const char *pFieldName, float pValue)
 Write field pFieldName field with a float as a value. More...
 
void FieldWriteD (double pValue)
 Write field value as double. More...
 
void FieldWriteD (const char *pFieldName, double pValue)
 Write field pFieldName field with a double as a value. More...
 
void FieldWriteT (FbxTime pTime)
 Write field value as time value. More...
 
void FieldWriteT (const char *pFieldName, FbxTime pValue)
 Write field pFieldName field with a time as a value. More...
 
void FieldWriteTS (FbxTimeSpan pTimeSpan)
 Write field value as timespan value. More...
 
void FieldWriteTS (const char *pFieldName, FbxTimeSpan pValue)
 Write field pFieldName field with a timespan as a value. More...
 
void FieldWriteFn (const float *pValue, FbxUInt pn)
 Write field value as an array of n floats (nF vector). More...
 
void FieldWriteFn (const char *pFieldName, const float *pValue, FbxUInt pn)
 Write field pFieldName field with a array of n floats as a value. More...
 
void FieldWrite3F (const float *pValue)
 Write field value as an array of 3 floats (3F vector). More...
 
void FieldWrite3F (const char *pFieldName, const float *pValue)
 Write field pFieldName field with a array of 3 floats as a value. More...
 
void FieldWrite4F (const float *pValue)
 Write field value as an array of 4 floats (4F vector). More...
 
void FieldWrite4F (const char *pFieldName, const float *pValue)
 Write field pFieldName field with a array of 4 floats as a value. More...
 
void FieldWriteDn (const double *pValue, FbxUInt pn)
 Write field value as an array of n doubles (nD vector). More...
 
void FieldWriteDn (const char *pFieldName, const double *pValue, FbxUInt pn)
 Write field pFieldName field with a array of n doubles as a value. More...
 
void FieldWrite3D (const double *pValue)
 Write field value as an array of 3 doubles (3D vector). More...
 
void FieldWrite3D (const char *pFieldName, const double *pValue)
 Write field pFieldName field with a array of 3 doubles as a value. More...
 
void FieldWrite4D (const double *pValue)
 Write field value as an array of 4 doubles (4D vector). More...
 
void FieldWrite4D (const char *pFieldName, const double *pValue)
 Write field pFieldName field with a array of 4 doubles as a value. More...
 
void FieldWriteArrayD (int n, const double *pValue, int pSize=1, int pStride=0)
 Write array to file. More...
 
void FieldWriteArrayF (int n, const float *pValue, int pSize=1, int pStride=0)
 Write array to file. More...
 
void FieldWriteArrayI (int n, const int *pValue, int pSize=1, int pStride=0)
 Write array to file. More...
 
void FieldWriteArrayLL (int n, const FbxLongLong *pValue, int pSize=1, int pStride=0)
 Write array to file. More...
 
void FieldWriteArrayB (int n, const bool *pValue, int pSize=1, int pStride=0)
 Write array to file. More...
 
void FieldWriteArrayBytes (int n, const FbxUChar *pValue, int pSize=1, int pStride=0)
 Write array to file. More...
 
void FieldWriteR (const void *pRawData, int pByteSize)
 Write field value as a raw data. More...
 
void FieldWriteR (const char *pFieldName, const void *pRawData, int pByteSize)
 Write field pFieldName field with raw data as a value. More...
 

Static Public Member Functions

static FbxIOCreate (BinaryType pBinaryType, FbxStatus &pStatus)
 Creation function for this FbxIO class. More...
 

Project related functions used to navigate on particular

 sections.
static void ProjectConvertVersionNumber (int pVersion, int &pMajor, int &pMinor, int &pRevision)
 Split a version number into major, minor and revision numbers. More...
 
bool ProjectOpenMainSection ()
 Open the main section of a project. More...
 
int ProjectGetExtensionSectionCount () const
 Get the number of extension sections of a project. More...
 
bool ProjectOpenExtensionSection (int pExtensionSectionIndex)
 Open an extension section of a project. More...
 
bool ProjectCreateExtensionSection (bool pOverwriteLastExtensionSection=false)
 Create an extension section in a project, not allowed in ASCII and encrypted modes. More...
 
void ProjectCloseSection ()
 Close current section. More...
 
int ProjectGetCurrentSection () const
 Get current section. More...
 
int ProjectGetCurrentSectionMode () const
 Get current section mode. More...
 
int ProjectGetCurrentSectionVersion () const
 Get current section version. More...
 
int ProjectGetSectionVersion (int pSection) const
 Get the version number of a section. More...
 
bool IsPasswordProtected () const
 Check the password protection flag. More...
 
bool CheckPassword (const char *pPassword)
 Set password protection flag to false if the argument matches the password stored in the section. More...
 
bool WritePassword (const char *pPassword)
 Encrypt and store password in a section. More...
 

Member Enumeration Documentation

◆ BinaryType

enum BinaryType
Enumerator
BinaryNormal 
BinaryLarge 

Definition at line 358 of file fbxio.h.

359  {
360  BinaryNormal, //<! Standard FBX file field alignment using 32bit values, used by all file format version 7.4.0 or lower
361  BinaryLarge //<! New FBX file field alignment using 64bit values, used by all file format version 7.5.0 or higher
362  };

Constructor & Destructor Documentation

◆ FbxIO()

FbxIO ( BinaryType  pBinaryType,
FbxStatus pStatus 
)

Default constructor.

◆ ~FbxIO()

virtual ~FbxIO ( )
virtual

Destructor.

Member Function Documentation

◆ Create()

static FbxIO* Create ( BinaryType  pBinaryType,
FbxStatus pStatus 
)
inlinestatic

Creation function for this FbxIO class.

Parameters
pStatusThe FbxStatus object to hold error codes.
Returns
a new FbxIO object pointer

Definition at line 368 of file fbxio.h.

368 { return FbxNew< FbxIO >(pBinaryType, pStatus); }

◆ ProjectOpen() [1/3]

bool ProjectOpen ( void *  pAddress,
FbxULong  pMaxLength,
FbxReader pReader,
bool  pCheckCRC = false,
bool  pOpenMainSection = true,
FbxIOFileHeaderInfo pFileHeaderInfo = ((void *) 0) 
)

Open a project already in Memory.

Parameters
pAddress
pMaxLength
pReader
pCheckCRC
pOpenMainSection
pFileHeaderInfo
Returns
true on success, false otherwise.

◆ ProjectOpen() [2/3]

bool ProjectOpen ( const char *  pName,
FbxReader pReader,
bool  pCheckCRC = false,
bool  pOpenMainSection = true,
FbxIOFileHeaderInfo pFileHeaderInfo = ((void *) 0) 
)

Open a project.

Parameters
pName
pReader
pCheckCRC
pOpenMainSection
pFileHeaderInfo
Returns
true on success, false otherwise.

◆ ProjectOpen() [3/3]

bool ProjectOpen ( FbxStream pStream,
void *  pStreamData,
FbxReader pReader,
bool  pCheckCRC = false,
bool  pOpenMainSection = true,
FbxIOFileHeaderInfo pFileHeaderInfo = ((void *) 0) 
)

Open a project.

Parameters
pStream
pStreamData
pReader
pCheckCRC
pOpenMainSection
pFileHeaderInfo
Returns
true on success, false otherwise.

◆ ProjectOpenDirect()

bool ProjectOpenDirect ( const char *  pName,
FbxReader pReader,
bool  pCheckCRC = false,
bool  pOpenMainSection = true,
FbxIOFileHeaderInfo pFileHeaderInfo = ((void *) 0) 
)

Open project file without necessarily an .fbx extension.

Parameters
pName
pReader
pCheckCRC
pOpenMainSection
pFileHeaderInfo
Returns
true on success, false otherwise.

◆ ProjectCreate() [1/3]

bool ProjectCreate ( void *  pAddress,
FbxUInt  pSize,
FbxWriter pWriter,
bool  pBinary,
bool  pEncrypted,
FbxIOFileHeaderInfo pFileHeaderInfo = ((void *) 0) 
)

Create a project in Memory.

Parameters
pAddress
pSize
pWriter
pBinary
pEncrypted
pFileHeaderInfo
Returns
true on success, false otherwise.

◆ ProjectCreate() [2/3]

bool ProjectCreate ( const char *  pName,
FbxWriter pWriter,
bool  pBinary,
bool  pEncrypted,
FbxIOFileHeaderInfo pFileHeaderInfo = ((void *) 0) 
)

Create a project.

Parameters
pName
pWriter
pBinary
pEncrypted
pFileHeaderInfo
Returns
true on success, false otherwise.

◆ ProjectCreate() [3/3]

bool ProjectCreate ( FbxStream pStream,
void *  pStreamData,
FbxWriter pWriter,
bool  pBinary,
bool  pEncrypted,
FbxIOFileHeaderInfo pFileHeaderInfo = ((void *) 0) 
)

Create a project.

Parameters
pStream
pStreamData
pWriter
pBinary
pEncrypted
pFileHeaderInfo
Returns
true on success, false otherwise.

◆ ProjectCreateDirect()

bool ProjectCreateDirect ( const char *  pName,
FbxWriter pWriter,
bool  pBinary,
bool  pEncrypted,
FbxIOFileHeaderInfo pFileHeaderInfo = ((void *) 0) 
)

Create a project without necessary an .fbx extension.

Parameters
pName
pWriter
pBinary
pEncrypted
pFileHeaderInfo
Returns
true on success, false otherwise.

◆ ProjectCreateEmpty() [1/2]

bool ProjectCreateEmpty ( const char *  pName,
FbxWriter pWriter,
int  pVersion,
bool  pBinary,
bool  pEncrypted 
)

Create a project, without writing out the header (yet)

Parameters
pName
pWriter
pVersion
pBinary
pEncrypted
Returns
true on success, false otherwise.

◆ ProjectCreateEmpty() [2/2]

bool ProjectCreateEmpty ( FbxStream pStream,
void *  pStreamData,
FbxWriter pWriter,
int  pVersion,
bool  pBinary,
bool  pEncrypted 
)

Create a project, without writing out the header (yet)

Parameters
pStream
pStreamData
pWriter
pVersion
pBinary
pEncrypted
Returns
true on success, false otherwise.

◆ ProjectWrite_BeginFileHeader()

bool ProjectWrite_BeginFileHeader ( )

Write FBX signature at the top of the file, prepare file for writing header information.

Returns
true on success, false otherwise.

◆ ProjectWrite_BeginExtendedHeader()

bool ProjectWrite_BeginExtendedHeader ( )

Open up the 'extended header'.

Returns
true on success, false otherwise.

◆ ProjectWrite_WriteExtendedHeader()

bool ProjectWrite_WriteExtendedHeader ( const FbxIOFileHeaderInfo pExtendedHeader)

Write the contents of the extended header.

Parameters
pExtendedHeader
Returns
true on success, false otherwise.

◆ ProjectWrite_EndExtendedHeader()

bool ProjectWrite_EndExtendedHeader ( )

Close the extended header.

Returns
true on success, false otherwise.

◆ ProjectWrite_EndFileHeader()

bool ProjectWrite_EndFileHeader ( )

Close up the header, prepare file for payload write.

Returns
true on success, false otherwise.

◆ ProjectClose()

bool ProjectClose ( void **  pData = 0,
size_t *  pSize = 0 
)

Close the project.

Parameters
pData
pSize
Returns
true on success, false otherwise.

◆ ProjectSetXRefManager()

void ProjectSetXRefManager ( const FbxXRefManager )

Provide the XRef Manager to use to create the .fbm folder.

Remarks
If NULL is used, the old behavior (using the .fbx's folder) is used instead.

◆ ProjectGetXRefManager()

const FbxXRefManager* ProjectGetXRefManager ( ) const

Get the XRef Manager to use.

Returns
NULL if no XRef manager has been set.

◆ ProjectCreateEmbeddedFolder()

bool ProjectCreateEmbeddedFolder ( const FbxXRefManager pXRefManager,
FbxString pCreatedFolder,
const char *  pUserDefinedFolder = ((void *) 0) 
)

Select (and create) a folder to store embedded files (the .fbm file folder).

Takes into account the settings from the XRef Manager.

Parameters
pXRefManager
pCreatedFolder
pUserDefinedFolderUser defined "working folder"
Returns
true on success, false otherwise.
Remarks
If this already been called successfully, uses the path previously created.

Client application is responsible for cleaning up this folder.

This will be automatically called if ProjectSetXRefManager() has been called before the .fbm folder needs to be created.

◆ SetEmbedded()

void SetEmbedded ( bool  pValue)

On store event, use this function to tell if we are embedding.

Parameters
pValue

◆ SetEmbeddingExtractionFolder()

void SetEmbeddingExtractionFolder ( const char *  pExtractionFolder)

Explicitly set the embedding extraction folder.

If this is never called, the FBX SDK will determine the best folder to extract embedded files.

Parameters
pExtractionFolderThe file path name where the embedded files should be extracted.

◆ GetEmbeddingExtractionFolder()

const char* GetEmbeddingExtractionFolder ( )

Retrieve the current folder destination where the embedded files will be extracted.

This might not be initialized until file I/O is performed.

◆ IsEmbedded()

bool IsEmbedded ( ) const

Check if file is embedded or not.

Returns
true if file is embedded, false otherwise.

◆ IsBinary()

bool IsBinary ( ) const

Check if file is binary or ASCII.

Returns
true if file is binary, false otherwise.

◆ IsEncrypted()

bool IsEncrypted ( ) const

Return if binary file is encrypted.

Returns
true if file is encrypted, false otherwise.

◆ CheckCRC()

bool CheckCRC ( )

Check CRC code.

File must be open, binary and encrypted.

Returns
true if CRC code is valid or file is not open, binary and encrypted.

◆ GetFileVersionNumber()

FbxUInt32 GetFileVersionNumber ( ) const

Return the file version number.

Returns
the file version number

◆ CacheSize() [1/2]

void CacheSize ( FbxUInt32  pCacheSize)

Set the cache size for accelerated IO.

Parameters
pCacheSizecache size to set (Kilo Byte)

◆ CacheSize() [2/2]

FbxUInt32 CacheSize ( ) const

Return the current cache size.

Returns
the current cache size

◆ Fbx7Support() [1/2]

bool Fbx7Support ( ) const
Returns
Current state of the flag.

◆ Fbx7Support() [2/2]

void Fbx7Support ( bool  pSupport)

Set the flag state to tell the parser to handle FBX7 files.

Parameters
pSupportNew flag state.

◆ CompressArrays() [1/2]

bool CompressArrays ( ) const
Returns
Current State of the flag.

◆ CompressArrays() [2/2]

void CompressArrays ( bool  pCompress)

Set the flag state.

Parameters
pCompressNew flag state.

◆ CompressMinimumSize() [1/2]

int CompressMinimumSize ( ) const
Returns
Current compression minimum size.

◆ CompressMinimumSize() [2/2]

void CompressMinimumSize ( int  pSize)

Set the compression minimum size.

Parameters
pSizeThreshold at which compression may embark.

◆ CompressLevel() [1/2]

int CompressLevel ( ) const
Returns
Current compression level.

◆ CompressLevel() [2/2]

void CompressLevel ( int  pLevel)

Set the compression level.

Parameters
pLevelValue of the desired compression.
Remarks
The allowed range for pLevel is [0-9] where 0 equals no compression and 9 is as-much-as-we-can.

◆ ProjectOpenMainSection()

bool ProjectOpenMainSection ( )

Open the main section of a project.

Returns
true on success, false otherwise.

◆ ProjectGetExtensionSectionCount()

int ProjectGetExtensionSectionCount ( ) const

Get the number of extension sections of a project.

Returns
the number of extension sections of a project.

◆ ProjectOpenExtensionSection()

bool ProjectOpenExtensionSection ( int  pExtensionSectionIndex)

Open an extension section of a project.

Parameters
pExtensionSectionIndex
Returns
true on success, false otherwise.

◆ ProjectCreateExtensionSection()

bool ProjectCreateExtensionSection ( bool  pOverwriteLastExtensionSection = false)

Create an extension section in a project, not allowed in ASCII and encrypted modes.

Parameters
pOverwriteLastExtensionSection
Returns
true on success, false otherwise.

◆ ProjectCloseSection()

void ProjectCloseSection ( )

Close current section.

◆ ProjectGetCurrentSection()

int ProjectGetCurrentSection ( ) const

Get current section.

Returns
the current section.

◆ ProjectGetCurrentSectionMode()

int ProjectGetCurrentSectionMode ( ) const

Get current section mode.

Returns
the current section mode.

◆ ProjectGetCurrentSectionVersion()

int ProjectGetCurrentSectionVersion ( ) const

Get current section version.

Returns
the current section version.

◆ ProjectGetSectionVersion()

int ProjectGetSectionVersion ( int  pSection) const

Get the version number of a section.

Parameters
pSection
Returns
the version number of a section.
Remarks
For main section it can be either 1000, 2000, 2001, 3000, 3001, 4000, 4001 or 4050. For the extension section it can be either 4000, 4001 or 4050. Returns 0 if section number does not exist.

◆ ProjectConvertVersionNumber()

static void ProjectConvertVersionNumber ( int  pVersion,
int &  pMajor,
int &  pMinor,
int &  pRevision 
)
static

Split a version number into major, minor and revision numbers.

Parameters
pVersionVersion number to split.
pMajorInteger to receive major version number.
pMinorInteger to receive minor version number.
pRevisionInteger to receive revision version number.

◆ IsPasswordProtected()

bool IsPasswordProtected ( ) const

Check the password protection flag.

Returns
true if the current section has a password, false otherwise.

◆ CheckPassword()

bool CheckPassword ( const char *  pPassword)

Set password protection flag to false if the argument matches the password stored in the section.

Parameters
pPassword
Returns
true if the argument matches the password stored in the section, false otherwise.
Remarks
This function only works in read mode.

◆ WritePassword()

bool WritePassword ( const char *  pPassword)

Encrypt and store password in a section.

Parameters
pPassword
Returns
true on success, false otherwise.
Remarks
This function only works in write mode and out of any enclosing block.
This function must not be called more than once per section.

◆ GetFilename()

const char* GetFilename ( ) const

Get project file name.

Returns
project file name.

◆ GetDataDirectory()

FbxString GetDataDirectory ( bool  pAutoCreate = true)

Get project data directory name.

Parameters
pAutoCreate
Returns
project data directory name.

◆ GetMediaDirectory()

FbxString GetMediaDirectory ( bool  pCreate = false,
const char *  pUserDefinedFolder = ((void *) 0) 
)

Get the current embedded folder used by this object.

Parameters
pCreateWhether create the media or not if no such folder is found
pUserDefinedFolderUser define working folder
Returns
the current embedded folder used by this object.
Remarks
If ProjectCreateEmbeddedFolder has never been called this will return an empty string, unless we're explicitly asked to create it.

◆ GetContainerTemplateDirectory()

FbxString GetContainerTemplateDirectory ( const char *  pTemplateName,
bool  pCreate 
)

Get the full path of the directory to extract the template file.

Parameters
pTemplateName
pCreate
Returns
the full path of the directory to extract the template file.

◆ GetRelativePath()

char* GetRelativePath ( const char *  pPath)

Get the path relative to project directory.

Parameters
pPath
Returns
the path relative to project directory.

◆ GetRelativeFilePath()

char* GetRelativeFilePath ( const char *  pFilePath)

Get the file path relative to project directory.

Parameters
pFilePath
Returns
the file path relative to project directory.

◆ GetFullPath()

char* GetFullPath ( const char *  pRelativePath)

Get the full path of path relative to project directory.

Parameters
pRelativePath
Returns
the full path of path relative to project directory.

◆ GetFullFilePath()

char* GetFullFilePath ( const char *  pRelativeFilePath)

Get the full file path of path relative to project directory.

Parameters
pRelativeFilePath
Returns
the full file path of path relative to project directory.

◆ GetTmpProjectName()

char* GetTmpProjectName ( const char *  pName) const

Get the temporary project name.

Parameters
pName
Returns
the temporary project name.

◆ SwapFromTmpProject()

bool SwapFromTmpProject ( const char *  pName,
char *  pError = ((void *) 0),
int  pErrorSize = 0 
)

Swap from temporary project.

Parameters
pName
pError
pErrorSize
Returns
true on success, false otherwise.

◆ FieldReadResetPosition()

void FieldReadResetPosition ( )

Reset the field read position.

◆ FieldGetCount()

int FieldGetCount ( ) const

Get the number of fields.

Returns
the number of fields.

◆ FieldGetName()

const char* FieldGetName ( int  pFieldIndex) const

Get the name of field indexed pFieldIndex.

Parameters
pFieldIndex
Returns
the name of field indexed pFieldIndex.

◆ FieldGetInstanceCount()

int FieldGetInstanceCount ( const char *  pFieldName) const

Get number of instance field pFieldName has.

Parameters
pFieldName
Returns
the number of instance field pFieldName has.

◆ FieldReadBegin() [1/3]

bool FieldReadBegin ( int  pFieldIndex,
int  pInstance 
)

Start to read field instance referred by field indexed pFieldIndex, instance indexed pInstance.

Parameters
pFieldIndex
pInstance
Returns
true on success, false otherwise.

◆ FieldReadBegin() [2/3]

bool FieldReadBegin ( const char *  pFieldName)

Start to read field pFieldName.

Parameters
pFieldName
Returns
true on success, false otherwise.

◆ FieldReadBegin() [3/3]

bool FieldReadBegin ( const char *  pFieldName,
int  pInstance 
)

Start to read field instance referred field pFieldName, instance indexed pInstance.

Parameters
pFieldName
pInstance
Returns
true on success, false otherwise.

◆ FieldReadEnd()

void FieldReadEnd ( )

Stop to read the current field.

◆ FieldReadIsBlock()

bool FieldReadIsBlock ( )

Return if current field is a block.

◆ FieldReadBlockBegin()

bool FieldReadBlockBegin ( )

Start to read a field block.

◆ FieldReadBlockEnd()

void FieldReadBlockEnd ( )

Stop to read a field block.

◆ FieldReadGetCount()

int FieldReadGetCount ( ) const

Return the number of read field.

◆ FieldReadGetRemain()

int FieldReadGetRemain ( ) const

Return the number of field remaining to be read.

◆ FieldReadGetType()

char FieldReadGetType ( ) const

Return current field value type.

◆ FieldReadCH() [1/2]

char FieldReadCH ( )

Return current field value as a char.

◆ FieldReadCH() [2/2]

char FieldReadCH ( const char *  pFieldName,
char  pDefault = 0 
)

Return field pFieldName's value as a char.

Parameters
pFieldName
pDefault

◆ FieldReadC() [1/2]

const char* FieldReadC ( )

Return current field value as a char pointer.

◆ FieldReadC() [2/2]

const char* FieldReadC ( const char *  pFieldName,
const char *  pDefault = "" 
)

Return field pFieldName's value as a char pointer.

Parameters
pFieldName
pDefault

◆ FieldReadS() [1/2]

const char* FieldReadS ( )

Return current field value as a string (a char pointer).

◆ FieldReadS() [2/2]

const char* FieldReadS ( const char *  pFieldName,
const char *  pDefault = "" 
)

Return field pFieldName's value as a char pointer.

Parameters
pFieldName
pDefault

◆ FieldReadB() [1/2]

bool FieldReadB ( )

Return current field value as an bool.

◆ FieldReadB() [2/2]

bool FieldReadB ( const char *  pFieldName,
bool  pDefault = false 
)

Return field pFieldName's value as an integer.

Parameters
pFieldName
pDefault

◆ FieldReadI() [1/2]

int FieldReadI ( )

Return current field value as an integer.

◆ FieldReadI() [2/2]

int FieldReadI ( const char *  pFieldName,
int  pDefault = 0 
)

Return field pFieldName's value as an integer.

Parameters
pFieldName
pDefault

◆ FieldReadLL() [1/2]

FbxLongLong FieldReadLL ( )

Return current field value as an integer.

◆ FieldReadLL() [2/2]

FbxLongLong FieldReadLL ( const char *  pFieldName,
FbxLongLong  pDefault = 0 
)

Return field pFieldName's value as an integer.

Parameters
pFieldName
pDefault

◆ FieldReadF() [1/2]

float FieldReadF ( )

Return current field value as a float.

◆ FieldReadF() [2/2]

float FieldReadF ( const char *  pFieldName,
float  pDefault = 0 
)

Return field pFieldName's value as a float.

Parameters
pFieldName
pDefault

◆ FieldReadD() [1/2]

double FieldReadD ( )

Return current field value as a double.

◆ FieldReadD() [2/2]

double FieldReadD ( const char *  pFieldName,
double  pDefault = 0 
)

Return field pFieldName's value as a double.

Parameters
pFieldName
pDefault

◆ FieldReadT() [1/2]

FbxTime FieldReadT ( const char *  pFieldName)

Return field pFieldName's value as a time value.

Parameters
pFieldName

◆ FieldReadT() [2/2]

FbxTime FieldReadT ( )

Return field pFieldName's value as a time value.

◆ FieldReadTS() [1/2]

FbxTimeSpan FieldReadTS ( const char *  pFieldName)

Return field pFieldName's value as a timespan value.

Parameters
pFieldName

◆ FieldReadTS() [2/2]

FbxTimeSpan FieldReadTS ( )

Return field pFieldName's value as a timespan value.

◆ FieldReadFn() [1/2]

void FieldReadFn ( float *  pValue,
FbxUInt  pn 
)

Return current field value as a n floats array.

Parameters
pValue
pn

◆ FieldRead3F() [1/2]

void FieldRead3F ( float *  pValue)

Return current field value as a 3 floats array.

Parameters
pValue

◆ FieldRead4F() [1/2]

void FieldRead4F ( float *  pValue)

Return current field value as a 4 floats array.

Parameters
pValue

◆ FieldReadFn() [2/2]

void FieldReadFn ( const char *  pFieldName,
float *  pValue,
const float *  pDefault,
FbxUInt  pn 
)

Return field pFieldName's value as n floats array.

Parameters
pFieldName
pValue
pDefault
pn

◆ FieldRead3F() [2/2]

void FieldRead3F ( const char *  pFieldName,
float *  pValue,
const float *  pDefault = ((void *) 0) 
)

Return field pFieldName's value as 4 floats array.

Parameters
pFieldName
pValue
pDefault

◆ FieldRead4F() [2/2]

void FieldRead4F ( const char *  pFieldName,
float *  pValue,
const float *  pDefault = ((void *) 0) 
)

Return field pFieldName's value as 3 floats array.

Parameters
pFieldName
pValue
pDefault

◆ FieldReadDn() [1/2]

void FieldReadDn ( double *  pValue,
FbxUInt  pn 
)

Return current field value as a n doubles array.

Parameters
pValue
pn

◆ FieldRead3D() [1/2]

void FieldRead3D ( double *  pValue)

Return current field value as a 3 doubles array.

Parameters
pValue

◆ FieldRead4D() [1/2]

void FieldRead4D ( double *  pValue)

Return current field value as a 4 doubles array.

Parameters
pValue

◆ FieldReadDn() [2/2]

void FieldReadDn ( const char *  pFieldName,
double *  pValue,
const double *  pDefault,
FbxUInt  pn 
)

Return field pFieldName's value as n doubles array.

Parameters
pFieldName
pValue
pDefault
pn

◆ FieldRead3D() [2/2]

void FieldRead3D ( const char *  pFieldName,
double *  pValue,
const double *  pDefault = ((void *) 0) 
)

Return field pFieldName's value as 4 doubles array.

Parameters
pFieldName
pValue
pDefault

◆ FieldRead4D() [2/2]

void FieldRead4D ( const char *  pFieldName,
double *  pValue,
const double *  pDefault = ((void *) 0) 
)

Return field pFieldName's value as 3 doubles array.

Parameters
pFieldName
pValue
pDefault

◆ FieldReadR() [1/2]

void* FieldReadR ( int *  pByteSize)

Return current field value as raw data.

Parameters
pByteSize

◆ FieldReadR() [2/2]

void* FieldReadR ( const char *  pFieldName,
int *  pByteSize 
)

Return field pFieldName's value as raw data.

Parameters
pFieldName
pByteSize

◆ FieldReadByte() [1/2]

FbxChar FieldReadByte ( )

Return field pFieldName's value as byte.

◆ FieldReadByte() [2/2]

FbxChar FieldReadByte ( const char *  pFieldName,
FbxChar  pDefault = 0 
)

Return field pFieldName's value as a byte value.

Parameters
pFieldName
pDefault

◆ FieldReadUByte() [1/2]

FbxUChar FieldReadUByte ( )

Return field pFieldName's value as unsigned byte.

◆ FieldReadUByte() [2/2]

FbxUChar FieldReadUByte ( const char *  pFieldName,
FbxUChar  pDefault = 0 
)

Return field pFieldName's value as an unsigned byte value.

Parameters
pFieldName
pDefault

◆ FieldReadShort() [1/2]

FbxShort FieldReadShort ( )

Return field pFieldName's value as short.

◆ FieldReadShort() [2/2]

FbxShort FieldReadShort ( const char *  pFieldName,
FbxShort  pDefault = 0 
)

Return field pFieldName's value as a short value.

Parameters
pFieldName
pDefault

◆ FieldReadUShort() [1/2]

FbxUShort FieldReadUShort ( )

Return field pFieldName's value as unsigned short.

◆ FieldReadUShort() [2/2]

FbxUShort FieldReadUShort ( const char *  pFieldName,
FbxUShort  pDefault = 0 
)

Return field pFieldName's value as an unsigned short value.

Parameters
pFieldName
pDefault

◆ FieldReadUI() [1/2]

unsigned int FieldReadUI ( )

Return field pFieldName's value as unsigned integer.

◆ FieldReadUI() [2/2]

unsigned int FieldReadUI ( const char *  pFieldName,
unsigned int  pDefault = 0 
)

Return field pFieldName's value as an unsigned int as a value.

Parameters
pFieldName
pDefault

◆ FieldReadULL() [1/2]

FbxULongLong FieldReadULL ( )

Return field pFieldName's value as 64 bit unsigned integer.

◆ FieldReadULL() [2/2]

FbxULongLong FieldReadULL ( const char *  pFieldName,
FbxULongLong  pDefault = 0 
)

Return field pFieldName's value as an 64 bit unsigned int as a value.

Parameters
pFieldName
pDefault

◆ FieldReadArraySBytes()

const FbxChar* FieldReadArraySBytes ( int &  pCount)

Read the whole array and return the pointer to it.

Parameters
pCountNb of items in the array.

◆ FieldReadArrayShort()

const FbxShort* FieldReadArrayShort ( int &  pCount)

Read the whole array and return the pointer to it.

Parameters
pCountNb of items in the array.

◆ FieldReadArrayUShort()

const FbxUShort* FieldReadArrayUShort ( int &  pCount)

Read the whole array and return the pointer to it.

Parameters
pCountNb of items in the array.

◆ FieldReadArrayUI()

const unsigned int* FieldReadArrayUI ( int &  pCount)

Read the whole array and return the pointer to it.

Parameters
pCountNb of items in the array.

◆ FieldReadArrayULL()

const FbxULongLong* FieldReadArrayULL ( int &  pCount)

Read the whole array and return the pointer to it.

Parameters
pCountNb of items in the array.

◆ FieldReadArray() [1/11]

const FbxChar* FieldReadArray ( int &  pCount,
const FbxChar  
)

Read the whole array and return the pointer to it.

Parameters
pCountNb of items in the array.

◆ FieldReadArray() [2/11]

const FbxShort* FieldReadArray ( int &  pCount,
const FbxShort  
)

Read the whole array and return the pointer to it.

Parameters
pCountNb of items in the array.Read the whole array and return the pointer to it.
pCountNb of items in the array.

◆ FieldReadArray() [3/11]

const FbxUShort* FieldReadArray ( int &  pCount,
const FbxUShort  
)

Read the whole array and return the pointer to it.

Parameters
pCountNb of items in the array.

◆ FieldReadArray() [4/11]

const unsigned int* FieldReadArray ( int &  pCount,
const unsigned int *   
)

Read the whole array and return the pointer to it.

Parameters
pCountNb of items in the array.

◆ FieldReadArray() [5/11]

const FbxULongLong* FieldReadArray ( int &  pCount,
const FbxULongLong  
)

Read the whole array and return the pointer to it.

Parameters
pCountNb of items in the array.

◆ FieldReadEmbeddedFile()

virtual bool FieldReadEmbeddedFile ( FbxString pFileName,
FbxString pRelativeFileName,
const char *  pEmbeddedMediaDirectory = "",
bool *  pIsFileCreated = ((void *) 0) 
)
virtual

Read field and copy it into a file.

Parameters
pFileNameEmbedded file full path+name.
pRelativeFileNameRelative path+name of the embedded file.
pEmbeddedMediaDirectoryDirectory of the embedded media.
pIsFileCreatedStatus of the extraction of the embedded data. Set to true if the embedded media is correctly extracted in the media directory.
Remarks
Only works when file is binary. This function is not related to flag mEmbedded.
Returns
false if operation failed.

◆ FieldReadArrayD()

const double* FieldReadArrayD ( int &  pCount)

Read the whole array and return the pointer to it.

Parameters
pCountNb of items in the array.

◆ FieldReadArrayF()

const float* FieldReadArrayF ( int &  pCount)

Read the whole array and return the pointer to it.

Parameters
pCountNb of items in the array.

◆ FieldReadArrayI()

const int* FieldReadArrayI ( int &  pCount)

Read the whole array and return the pointer to it.

Parameters
pCountNb of items in the array.

◆ FieldReadArrayLL()

const FbxLongLong* FieldReadArrayLL ( int &  pCount)

Read the whole array and return the pointer to it.

Parameters
pCountNb of items in the array.

◆ FieldReadArrayB()

const bool* FieldReadArrayB ( int &  pCount)

Read the whole array and return the pointer to it.

Parameters
pCountNb of items in the array.

◆ FieldReadArrayBytes()

const FbxUChar* FieldReadArrayBytes ( int &  pCount)

Read the whole array and return the pointer to it.

Parameters
pCountNb of items in the array.

◆ FieldReadArray() [6/11]

const int* FieldReadArray ( int &  pCount,
const int *   
)

Read the whole array and return the pointer to it.

Parameters
pCountNb of items in the array.

◆ FieldReadArray() [7/11]

const float* FieldReadArray ( int &  pCount,
const float *   
)

Read the whole array and return the pointer to it.

Parameters
pCountNb of items in the array.

◆ FieldReadArray() [8/11]

const double* FieldReadArray ( int &  pCount,
const double *   
)

Read the whole array and return the pointer to it.

Parameters
pCountNb of items in the array.

◆ FieldReadArray() [9/11]

const FbxLongLong* FieldReadArray ( int &  pCount,
const FbxLongLong  
)

Read the whole array and return the pointer to it.

Parameters
pCountNb of items in the array.

◆ FieldReadArray() [10/11]

const bool* FieldReadArray ( int &  pCount,
const bool *   
)

Read the whole array and return the pointer to it.

Parameters
pCountNb of items in the array.

◆ FieldReadArray() [11/11]

const FbxUChar* FieldReadArray ( int &  pCount,
const FbxUChar  
)

Read the whole array and return the pointer to it.

Parameters
pCountNb of items in the array.

◆ FieldWriteBegin()

void FieldWriteBegin ( const char *  pFieldName)

Start to write a field called pFieldName.

Parameters
pFieldName

◆ FieldWriteEnd()

void FieldWriteEnd ( )

Stop to write the current field.

◆ FieldWriteBlockBegin() [1/2]

void FieldWriteBlockBegin ( )

Start to write a field block.

◆ FieldWriteObjectBegin()

void FieldWriteObjectBegin ( const char *  pObjectType,
const char *  pName,
const char *  pSubType = ((void *) 0) 
)

Start to write an object reference field.

Parameters
pObjectType
pName
pSubType

◆ FieldWriteObjectEnd()

void FieldWriteObjectEnd ( )

Stop to write an object reference field.

◆ FieldWriteBlockBegin() [2/2]

void FieldWriteBlockBegin ( const char *  pFileName)

Start to write a field block in file pFileName.

Parameters
pFileName
Remarks
This function is disabled but kept accessible for the FBX SDK.

◆ FieldWriteBlockEnd()

void FieldWriteBlockEnd ( )

Stop to write a block of field.

◆ FieldWriteCH() [1/2]

void FieldWriteCH ( char  pValue)

Write field value as a char.

Parameters
pValue

◆ FieldWriteCH() [2/2]

void FieldWriteCH ( const char *  pFieldName,
char  pValue 
)

Write field pFieldName field with a char as a value.

Parameters
pFieldName
pValue

◆ FieldWriteC() [1/2]

void FieldWriteC ( const char *  pValue)

Write field value as char pointer pValue.

Parameters
pValue

◆ FieldWriteC() [2/2]

void FieldWriteC ( const char *  pFieldName,
const char *  pValue 
)

Write field pFieldName with a char pointer as a value.

Parameters
pFieldName
pValue

◆ FieldWriteS() [1/4]

void FieldWriteS ( const char *  pValue)

Write field value as FbxString pValue.

Parameters
pValue

◆ FieldWriteS() [2/4]

void FieldWriteS ( const FbxString pValue)

Write field value as FbxString pValue.

Parameters
pValue

◆ FieldWriteS() [3/4]

void FieldWriteS ( const char *  pFieldName,
const char *  pValue 
)

Write field pFieldName field with a FbxString as a value.

Parameters
pFieldName
pValue

◆ FieldWriteS() [4/4]

void FieldWriteS ( const char *  pFieldName,
const FbxString pValue 
)

Write field pFieldName field with a FbxString as a value.

Parameters
pFieldName
pValue

◆ FieldWriteB() [1/2]

void FieldWriteB ( bool  pValue)

Write field value as bool.

Parameters
pValue

◆ FieldWriteB() [2/2]

void FieldWriteB ( const char *  pFieldName,
bool  pValue 
)

Write field pFieldName field with a bool value.

Parameters
pFieldName
pValue

◆ FieldWriteI() [1/2]

void FieldWriteI ( int  pValue)

Write field value as integer.

Parameters
pValue

◆ FieldWriteI() [2/2]

void FieldWriteI ( const char *  pFieldName,
int  pValue 
)

Write field pFieldName field with an int as a value.

Parameters
pFieldName
pValue

◆ FieldWriteLL() [1/2]

void FieldWriteLL ( FbxLongLong  pValue)

Write field value as 64 bit integer.

Parameters
pValue

◆ FieldWriteLL() [2/2]

void FieldWriteLL ( const char *  pFieldName,
FbxLongLong  pValue 
)

Write field pFieldName field with an 64 bit int as a value.

Parameters
pFieldName
pValue

◆ FieldWriteF() [1/2]

void FieldWriteF ( float  pValue)

Write field value as float.

Parameters
pValue
Remarks
Only compatible with 1) MotionBuilder 4.0 and later 2) FBX SDK 3.6.1 and later.

◆ FieldWriteF() [2/2]

void FieldWriteF ( const char *  pFieldName,
float  pValue 
)

Write field pFieldName field with a float as a value.

Parameters
pFieldName
pValue
Remarks
Only compatible with 1) MotionBuilder 4.0 and later 2) FBX SDK 3.6.1 and later.

◆ FieldWriteD() [1/2]

void FieldWriteD ( double  pValue)

Write field value as double.

Parameters
pValue

◆ FieldWriteD() [2/2]

void FieldWriteD ( const char *  pFieldName,
double  pValue 
)

Write field pFieldName field with a double as a value.

Parameters
pFieldName
pValue

◆ FieldWriteT() [1/2]

void FieldWriteT ( FbxTime  pTime)

Write field value as time value.

Parameters
pTime

◆ FieldWriteT() [2/2]

void FieldWriteT ( const char *  pFieldName,
FbxTime  pValue 
)

Write field pFieldName field with a time as a value.

Parameters
pFieldName
pValue

◆ FieldWriteTS() [1/2]

void FieldWriteTS ( FbxTimeSpan  pTimeSpan)

Write field value as timespan value.

Parameters
pTimeSpan

◆ FieldWriteTS() [2/2]

void FieldWriteTS ( const char *  pFieldName,
FbxTimeSpan  pValue 
)

Write field pFieldName field with a timespan as a value.

Parameters
pFieldName
pValue

◆ FieldWriteFn() [1/2]

void FieldWriteFn ( const float *  pValue,
FbxUInt  pn 
)

Write field value as an array of n floats (nF vector).

Parameters
pValue
pn

◆ FieldWriteFn() [2/2]

void FieldWriteFn ( const char *  pFieldName,
const float *  pValue,
FbxUInt  pn 
)

Write field pFieldName field with a array of n floats as a value.

Parameters
pFieldName
pValue
pn

◆ FieldWrite3F() [1/2]

void FieldWrite3F ( const float *  pValue)

Write field value as an array of 3 floats (3F vector).

Parameters
pValue

◆ FieldWrite3F() [2/2]

void FieldWrite3F ( const char *  pFieldName,
const float *  pValue 
)

Write field pFieldName field with a array of 3 floats as a value.

Parameters
pFieldName
pValue

◆ FieldWrite4F() [1/2]

void FieldWrite4F ( const float *  pValue)

Write field value as an array of 4 floats (4F vector).

Parameters
pValue

◆ FieldWrite4F() [2/2]

void FieldWrite4F ( const char *  pFieldName,
const float *  pValue 
)

Write field pFieldName field with a array of 4 floats as a value.

Parameters
pFieldName
pValue

◆ FieldWriteDn() [1/2]

void FieldWriteDn ( const double *  pValue,
FbxUInt  pn 
)

Write field value as an array of n doubles (nD vector).

Parameters
pValue
pn

◆ FieldWriteDn() [2/2]

void FieldWriteDn ( const char *  pFieldName,
const double *  pValue,
FbxUInt  pn 
)

Write field pFieldName field with a array of n doubles as a value.

Parameters
pFieldName
pValue
pn

◆ FieldWrite3D() [1/2]

void FieldWrite3D ( const double *  pValue)

Write field value as an array of 3 doubles (3D vector).

Parameters
pValue

◆ FieldWrite3D() [2/2]

void FieldWrite3D ( const char *  pFieldName,
const double *  pValue 
)

Write field pFieldName field with a array of 3 doubles as a value.

Parameters
pFieldName
pValue

◆ FieldWrite4D() [1/2]

void FieldWrite4D ( const double *  pValue)

Write field value as an array of 4 doubles (4D vector).

Parameters
pValue

◆ FieldWrite4D() [2/2]

void FieldWrite4D ( const char *  pFieldName,
const double *  pValue 
)

Write field pFieldName field with a array of 4 doubles as a value.

Parameters
pFieldName
pValue

◆ FieldWriteArrayD()

void FieldWriteArrayD ( int  n,
const double *  pValue,
int  pSize = 1,
int  pStride = 0 
)

Write array to file.

Parameters
nNb of items in the array.
pValuePointer to the data.
pSizeSize of each item in the array.
pStrideArray stride.

◆ FieldWriteArrayF()

void FieldWriteArrayF ( int  n,
const float *  pValue,
int  pSize = 1,
int  pStride = 0 
)

Write array to file.

Parameters
nNb of items in the array.
pValuePointer to the data.
pSizeSize of each item in the array.
pStrideArray stride.

◆ FieldWriteArrayI()

void FieldWriteArrayI ( int  n,
const int *  pValue,
int  pSize = 1,
int  pStride = 0 
)

Write array to file.

Parameters
nNb of items in the array.
pValuePointer to the data.
pSizeSize of each item in the array.
pStrideArray stride.

◆ FieldWriteArrayLL()

void FieldWriteArrayLL ( int  n,
const FbxLongLong pValue,
int  pSize = 1,
int  pStride = 0 
)

Write array to file.

Parameters
nNb of items in the array.
pValuePointer to the data.
pSizeSize of each item in the array.
pStrideArray stride.

◆ FieldWriteArrayB()

void FieldWriteArrayB ( int  n,
const bool *  pValue,
int  pSize = 1,
int  pStride = 0 
)

Write array to file.

Parameters
nNb of items in the array.
pValuePointer to the data.
pSizeSize of each item in the array.
pStrideArray stride.

◆ FieldWriteArrayBytes()

void FieldWriteArrayBytes ( int  n,
const FbxUChar pValue,
int  pSize = 1,
int  pStride = 0 
)

Write array to file.

Parameters
nNb of items in the array.
pValuePointer to the data.
pSizeSize of each item in the array.
pStrideArray stride.

◆ FieldWriteR() [1/2]

void FieldWriteR ( const void *  pRawData,
int  pByteSize 
)

Write field value as a raw data.

Parameters
pRawData
pByteSize

◆ FieldWriteR() [2/2]

void FieldWriteR ( const char *  pFieldName,
const void *  pRawData,
int  pByteSize 
)

Write field pFieldName field with raw data as a value.

Parameters
pFieldName
pRawData
pByteSize

◆ FieldWriteByte() [1/2]

void FieldWriteByte ( FbxChar  pValue)

Write field value as byte.

Parameters
pValue

◆ FieldWriteByte() [2/2]

void FieldWriteByte ( const char *  pFieldName,
FbxChar  pValue 
)

Write field pFieldName field with a byte value.

Parameters
pFieldName
pValue

◆ FieldWriteUByte() [1/2]

void FieldWriteUByte ( FbxUChar  pValue)

Write field value as unsigned byte.

Parameters
pValue

◆ FieldWriteUByte() [2/2]

void FieldWriteUByte ( const char *  pFieldName,
FbxUChar  pValue 
)

Write field pFieldName field with an unsigned byte value.

Parameters
pFieldName
pValue

◆ FieldWriteShort() [1/2]

void FieldWriteShort ( FbxShort  pValue)

Write field value as short.

Parameters
pValue

◆ FieldWriteShort() [2/2]

void FieldWriteShort ( const char *  pFieldName,
FbxShort  pValue 
)

Write field pFieldName field with a short value.

Parameters
pFieldName
pValue

◆ FieldWriteUShort() [1/2]

void FieldWriteUShort ( FbxUShort  pValue)

Write field value as unsigned short.

Parameters
pValue

◆ FieldWriteUShort() [2/2]

void FieldWriteUShort ( const char *  pFieldName,
FbxUShort  pValue 
)

Write field pFieldName field with an unsigned short value.

Parameters
pFieldName
pValue

◆ FieldWriteUI() [1/2]

void FieldWriteUI ( unsigned int  pValue)

Write field value as an unsigned integer.

Parameters
pValue

◆ FieldWriteUI() [2/2]

void FieldWriteUI ( const char *  pFieldName,
unsigned int  pValue 
)

Write field pFieldName field with an unsigned int as a value.

Parameters
pFieldName
pValue

◆ FieldWriteULL() [1/2]

void FieldWriteULL ( FbxULongLong  pValue)

Write field value as 64 bit unsigned integer.

Parameters
pValue

◆ FieldWriteULL() [2/2]

void FieldWriteULL ( const char *  pFieldName,
FbxULongLong  pValue 
)

Write field pFieldName field with an 64 bit unsigned int as a value.

Parameters
pFieldName
pValue
Returns
void

◆ FieldWriteArraySBytes()

void FieldWriteArraySBytes ( int  n,
const FbxChar pValue,
int  pSize = 1,
int  pStride = 0 
)

Write array to file.

Parameters
nNb of items in the array.
pValuePointer to the data.
pSizeSize of each item in the array.
pStrideArray stride.

◆ FieldWriteArrayShort()

void FieldWriteArrayShort ( int  n,
const FbxShort pValue,
int  pSize = 1,
int  pStride = 0 
)

Write array to file.

Parameters
nNb of items in the array.
pValuePointer to the data.
pSizeSize of each item in the array.
pStrideArray stride.

◆ FieldWriteArrayUShort()

void FieldWriteArrayUShort ( int  n,
const FbxUShort pValue,
int  pSize = 1,
int  pStride = 0 
)

Write array to file.

Parameters
nNb of items in the array.
pValuePointer to the data.
pSizeSize of each item in the array.
pStrideArray stride.

◆ FieldWriteArrayUI()

void FieldWriteArrayUI ( int  n,
const unsigned int *  pValue,
int  pSize = 1,
int  pStride = 0 
)

Write array to file.

Parameters
nNb of items in the array.
pValuePointer to the data.
pSizeSize of each item in the array.
pStrideArray stride.

◆ FieldWriteArrayULL()

void FieldWriteArrayULL ( int  n,
const FbxULongLong pValue,
int  pSize = 1,
int  pStride = 0 
)

Write array to file.

Parameters
nNb of items in the array.
pValuePointer to the data.
pSizeSize of each item in the array.
pStrideArray stride.

◆ GetFieldRMaxChunkSize()

int GetFieldRMaxChunkSize ( ) const

ASCII files may limit how big you can write your raw data, forcing you to break it down into chunks.

Returns
int

◆ FieldWriteObjectReference() [1/2]

void FieldWriteObjectReference ( const char *  pName)

Write object reference pName in the current field.

Parameters
pName

◆ FieldWriteObjectReference() [2/2]

void FieldWriteObjectReference ( const char *  pFieldName,
const char *  pName 
)

Write object reference pName in field pFieldName.

Parameters
pFieldName
pName

◆ FieldWriteEmbeddedFile()

bool FieldWriteEmbeddedFile ( FbxString  pFileName,
FbxString  pRelativeFileName 
)

Write field with file content as a value.

Parameters
pFileName
pRelativeFileName
Remarks
Only works when file is binary. This function is not related to flag mEmbedded.
Returns
false if operation failed.

◆ WriteComments()

void WriteComments ( const char *  pFieldName)

Write comments, only effective in ASCII mode.

Parameters
pFieldName

◆ GetHaveLoadedEmbededFile()

bool GetHaveLoadedEmbededFile ( ) const

Get if the embedded file is currently loaded.

Returns
true if loaded, false otherwise
Remarks
An embedded file is a file like a JPEG image used for texture or an AVI file for video. When files are embedded, the size of the FBX file can be very large since other files are embedded in it. FBX Version 6 and lower cannot embed files when saved in ASCII. FBX Version 7 and over can embed files even when saved in ASCII mode.

◆ GetMemoryFileInfo()

void GetMemoryFileInfo ( void **  pMemPtr,
size_t &  pSize 
) const

Get the maximum byte count written.

Parameters
pMemPtrThe address of the memory file
[out]pSizeStores the maximum byte count written

◆ IsBeforeVersion6()

bool IsBeforeVersion6 ( ) const

Get a internal flag to manage pre FBX version 6 data format Used for backwards compatibility.

◆ SetIsBeforeVersion6()

void SetIsBeforeVersion6 ( bool  pIsBeforeVersion6)

Set a internal flag to manage pre FBX version 6 data format Used for backwards compatibility.


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