FBX C++ API Reference
fbxio.h
Go to the documentation of this file.
1 /****************************************************************************************
2 
3  Copyright (C) 2017 Autodesk, Inc.
4  All rights reserved.
5 
6  Use of this software is subject to the terms of the Autodesk license agreement
7  provided at the time of installation or download, or which otherwise accompanies
8  this software in either electronic or hard copy form.
9 
10 ****************************************************************************************/
11 
13 #ifndef _FBXSDK_FILEIO_FBX_IO_H_
14 #define _FBXSDK_FILEIO_FBX_IO_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
21 
22 #include <fbxsdk/fbxsdk_nsbegin.h>
23 
24 class FbxIO;
25 class FbxReader;
26 class FbxWriter;
27 class FbxFile;
28 class FbxStream;
29 class FbxXRefManager;
30 
122 //File version numbers
123 #define FBX_FILE_VERSION_2000 2000 //FBX 2.0
124 #define FBX_FILE_VERSION_2001 2001 //FBX 2.01
125 #define FBX_FILE_VERSION_3000 3000 //FBX 3.0
126 #define FBX_FILE_VERSION_3001 3001 //FBX 3.01
127 #define FBX_FILE_VERSION_4000 4000 //FBX 4.0
128 #define FBX_FILE_VERSION_4001 4001 //FBX 4.01
129 #define FBX_FILE_VERSION_4050 4050 //FBX 4.5
130 #define FBX_FILE_VERSION_5000 5000 //FBX 5.0
131 #define FBX_FILE_VERSION_5800 5800 //FBX 5.8
132 #define FBX_FILE_VERSION_6000 6000 //FBX 6.0
133 #define FBX_FILE_VERSION_6100 6100 //FBX 6.1 (guarantee compatibility with Autodesk 2010 products)
134 #define FBX_FILE_VERSION_7000 7000 //Compatible with 7.1, and taken as such
135 #define FBX_FILE_VERSION_7099 7099 //Compatible with 7.1, and taken as such
136 #define FBX_FILE_VERSION_7100 7100 //FBX 7.1 (guarantee compatibility with Autodesk 2011 products)
137 #define FBX_FILE_VERSION_7200 7200 //FBX 7.2 (guarantee compatibility with Autodesk 2012 products)
138 #define FBX_FILE_VERSION_7300 7300 //FBX 7.3 (guarantee compatibility with Autodesk 2013 products)
139 #define FBX_FILE_VERSION_7400 7400 //FBX 7.4 (guarantee compatibility with Autodesk 2014/2015 products)
140 #define FBX_FILE_VERSION_7500 7500 //FBX 7.5 (guarantee compatibility with Autodesk 2016 products)
141 
142 //File version compatibility strings
143 #define FBX_53_MB55_COMPATIBLE "FBX53_MB55"
144 #define FBX_60_COMPATIBLE "FBX60_MB60"
145 #define FBX_2005_08_COMPATIBLE "FBX200508_MB70"
146 #define FBX_2006_02_COMPATIBLE "FBX200602_MB75"
147 #define FBX_2006_08_COMPATIBLE "FBX200608"
148 #define FBX_2006_11_COMPATIBLE "FBX200611"
149 #define FBX_2009_00_COMPATIBLE "FBX200900"
150 #define FBX_2009_00_V7_COMPATIBLE "FBX200900v7"
151 #define FBX_2010_00_COMPATIBLE "FBX201000"
152 #define FBX_2011_00_COMPATIBLE "FBX201100"
153 #define FBX_2012_00_COMPATIBLE "FBX201200"
154 #define FBX_2013_00_COMPATIBLE "FBX201300"
155 #define FBX_2014_00_COMPATIBLE "FBX201400"
156 #define FBX_2016_00_COMPATIBLE "FBX201600"
157 #define FBX_2018_00_COMPATIBLE "FBX201800"
158 #define FBX_2019_00_COMPATIBLE "FBX201900"
159 
160 //Default file version number used when writing new FBX files
161 #define FBX_DEFAULT_FILE_VERSION FBX_FILE_VERSION_7500
162 #define FBX_DEFAULT_FILE_COMPATIBILITY FBX_2019_00_COMPATIBLE
163 
177 FBXSDK_DLL int FbxFileVersionStrToInt(const char* pFileVersion);
178 
180 enum
181 {
185 };
186 
191 {
192 public:
194  bool mIsOK;
200  double mResolutionW;
202  double mResolutionH;
203 
211 
216  void Reset();
219 };
220 
226 {
227 public:
234 
236  virtual ~FbxIOFileHeaderInfo();
238 
243 
245  virtual void Reset();
246 
250  virtual bool ReadExtendedHeaderInformation(FbxIO*);
252 
255 
257 
259 
264 
267 
270 
275 
277  bool mIOPlugin;
278 
280  bool mPLE;
282 };
283 
327 {
328 public:
329 
333  {
336 
339  : mFbx(pFbx)
340  , mXRefManager(NULL)
341  {
342  if( mFbx )
343  {
344  mXRefManager = mFbx->ProjectGetXRefManager();
345  mFbx->ProjectSetXRefManager(&pXRefManager);
346  }
347  }
348 
351  {
352  if( mFbx )
353  {
354  mFbx->ProjectSetXRefManager(mXRefManager);
355  }
356  }
357  };
358 
360  {
361  BinaryNormal, //<! Standard FBX file field alignment using 32bit values, used by all file format version 7.4.0 or lower
362  BinaryLarge //<! New FBX file field alignment using 64bit values, used by all file format version 7.5.0 or higher
363  };
364 
369  static FbxIO* Create(BinaryType pBinaryType, FbxStatus& pStatus){ return FbxNew< FbxIO >(pBinaryType, pStatus); }
370 
372  FbxIO(BinaryType pBinaryType, FbxStatus& pStatus);
373 
375  virtual ~FbxIO();
376 
383 
393  bool ProjectOpen(void* pAddress, FbxULong pMaxLength, FbxReader* pReader, bool pCheckCRC = false, bool pOpenMainSection = true, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
394 
403  bool ProjectOpen(const char* pName, FbxReader* pReader, bool pCheckCRC = false, bool pOpenMainSection = true, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
404 
414  bool ProjectOpen(FbxStream* pStream, void* pStreamData, FbxReader* pReader, bool pCheckCRC = false, bool pOpenMainSection = true, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
415 
424  bool ProjectOpenDirect(const char* pName, FbxReader* pReader, bool pCheckCRC = false, bool pOpenMainSection = true, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
425 
435  bool ProjectCreate(void* pAddress, FbxUInt pSize, FbxWriter* pWriter, bool pBinary, bool pEncrypted, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
436 
445  bool ProjectCreate(const char* pName, FbxWriter* pWriter, bool pBinary, bool pEncrypted, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
446 
456  bool ProjectCreate(FbxStream* pStream, void* pStreamData, FbxWriter* pWriter, bool pBinary, bool pEncrypted, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
457 
466  bool ProjectCreateDirect(const char* pName, FbxWriter* pWriter, bool pBinary, bool pEncrypted, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
467 
476  bool ProjectCreateEmpty(const char* pName, FbxWriter* pWriter, int pVersion, bool pBinary, bool pEncrypted);
477 
487  bool ProjectCreateEmpty(FbxStream* pStream, void* pStreamData, FbxWriter* pWriter, int pVersion, bool pBinary, bool pEncrypted);
488 
492  bool ProjectWrite_BeginFileHeader();
493 
497  bool ProjectWrite_BeginExtendedHeader();
498 
503  bool ProjectWrite_WriteExtendedHeader(const FbxIOFileHeaderInfo* pExtendedHeader);
504 
508  bool ProjectWrite_EndExtendedHeader();
509 
513  bool ProjectWrite_EndFileHeader();
514 
520  bool ProjectClose(void** pData=0, size_t* pSize=0);
521 
525  void ProjectSetXRefManager(const FbxXRefManager*);
526 
530  const FbxXRefManager* ProjectGetXRefManager() const;
531 
546  bool ProjectCreateEmbeddedFolder(const FbxXRefManager& pXRefManager, FbxString& pCreatedFolder, const char* pUserDefinedFolder = NULL);
547 
551  void SetEmbedded(bool pValue);
552 
556  void SetEmbeddingExtractionFolder(const char* pExtractionFolder);
557 
560  const char* GetEmbeddingExtractionFolder();
561 
565  bool IsEmbedded() const;
566 
570  bool IsBinary() const;
571 
575  bool IsEncrypted () const;
576 
580  bool CheckCRC();
581 
585  FbxUInt32 GetFileVersionNumber() const;
586 
590  void CacheSize(FbxUInt32 pCacheSize);
591 
595  FbxUInt32 CacheSize() const;
596 
598 
609 
611  bool Fbx7Support() const;
612 
616  void Fbx7Support(bool pSupport);
617 
619  bool CompressArrays() const;
620 
624  void CompressArrays(bool pCompress);
625 
627  int CompressMinimumSize() const;
628 
632  void CompressMinimumSize(int pSize);
633 
635  int CompressLevel() const;
636 
642  void CompressLevel(int pLevel);
644 
650 
654  bool ProjectOpenMainSection();
655 
659  int ProjectGetExtensionSectionCount() const;
660 
665  bool ProjectOpenExtensionSection(int pExtensionSectionIndex);
666 
671  bool ProjectCreateExtensionSection(bool pOverwriteLastExtensionSection = false);
672 
675  void ProjectCloseSection();
676 
680  int ProjectGetCurrentSection() const;
681 
685  int ProjectGetCurrentSectionMode() const;
686 
690  int ProjectGetCurrentSectionVersion() const;
691 
699  int ProjectGetSectionVersion(int pSection) const;
700 
707  static void ProjectConvertVersionNumber(int pVersion, int& pMajor, int& pMinor, int& pRevision);
708 
712  bool IsPasswordProtected() const;
713 
719  bool CheckPassword(const char* pPassword);
720 
727  bool WritePassword(const char* pPassword);
728 
730 
735 
739  const char* GetFilename() const;
740 
745  FbxString GetDataDirectory(bool pAutoCreate = true);
746 
755  FbxString GetMediaDirectory(bool pCreate = false, const char* pUserDefinedFolder = NULL);
756 
762  FbxString GetContainerTemplateDirectory(const char* pTemplateName, bool pCreate);
763 
768  char* GetRelativePath(const char* pPath);
769 
774  char* GetRelativeFilePath(const char* pFilePath);
775 
780  char* GetFullPath(const char* pRelativePath);
781 
786  char* GetFullFilePath(const char* pRelativeFilePath);
787 
792  char* GetTmpProjectName(const char* pName) const;
793 
800  bool SwapFromTmpProject(const char* pName, char* pError=NULL, int pErrorSize=0);
801 
803 
809 
812  void FieldReadResetPosition();
813 
817  int FieldGetCount() const;
818 
823  const char* FieldGetName(int pFieldIndex) const;
824 
829  int FieldGetInstanceCount(const char* pFieldName) const;
830 
836  bool FieldReadBegin(int pFieldIndex, int pInstance);
837 
842  bool FieldReadBegin(const char* pFieldName);
843 
849  bool FieldReadBegin(const char* pFieldName, int pInstance);
850 
852  void FieldReadEnd();
853 
855  bool FieldReadIsBlock();
856 
858  bool FieldReadBlockBegin();
859 
861  void FieldReadBlockEnd();
862 
864  int FieldReadGetCount() const;
865 
867  int FieldReadGetRemain() const;
868 
870  char FieldReadGetType() const;
871 
873  char FieldReadCH();
874 
879  char FieldReadCH(const char* pFieldName, char pDefault=0);
880 
882  const char* FieldReadC();
883 
888  const char* FieldReadC(const char* pFieldName, const char* pDefault="");
889 
891  const char* FieldReadS();
892 
897  const char* FieldReadS(const char* pFieldName, const char* pDefault="");
898 
900  bool FieldReadB();
901 
906  bool FieldReadB(const char* pFieldName, bool pDefault = false);
907 
909  int FieldReadI();
910 int FieldReadI(const char* pFieldName, int pDefault=0);
915 
917  FbxLongLong FieldReadLL();
918 
923  FbxLongLong FieldReadLL(const char* pFieldName, FbxLongLong pDefault=0);
924 
926  float FieldReadF();
927 
932  float FieldReadF(const char* pFieldName, float pDefault=0);
933 
935  double FieldReadD();
936 
941  double FieldReadD(const char* pFieldName, double pDefault=0);
942 
946  FbxTime FieldReadT(const char* pFieldName);
947 
949  FbxTime FieldReadT();
950 
954  FbxTimeSpan FieldReadTS(const char* pFieldName);
955 
957  FbxTimeSpan FieldReadTS();
958 
963  void FieldReadFn(float* pValue, FbxUInt pn);
964 
968  void FieldRead3F(float* pValue);
969 
973  void FieldRead4F(float* pValue);
974 
981  void FieldReadFn(const char* pFieldName, float* pValue, const float *pDefault, FbxUInt pn);
982 
988  void FieldRead3F(const char* pFieldName, float* pValue, const float* pDefault=NULL);
989 
995  void FieldRead4F(const char* pFieldName, float* pValue, const float* pDefault=NULL);
996 
1001  void FieldReadDn(double* pValue, FbxUInt pn);
1002 
1006  void FieldRead3D(double* pValue);
1007 
1011  void FieldRead4D(double* pValue);
1012 
1019  void FieldReadDn(const char* pFieldName, double* pValue, const double *pDefault, FbxUInt pn);
1020 
1026  void FieldRead3D(const char* pFieldName, double* pValue, const double* pDefault=NULL);
1027 
1033  void FieldRead4D(const char* pFieldName, double* pValue, const double* pDefault=NULL);
1034 
1038  void* FieldReadR(int* pByteSize);
1039 
1044  void* FieldReadR(const char* pFieldName,int* pByteSize);
1045 
1050  FbxChar FieldReadByte();
1052 
1057  FbxChar FieldReadByte(const char* pFieldName, FbxChar pDefault=0);
1058 
1060  FbxUChar FieldReadUByte();
1061 
1066  FbxUChar FieldReadUByte(const char* pFieldName, FbxUChar pDefault=0);
1067 
1069  FbxShort FieldReadShort();
1070 
1075  FbxShort FieldReadShort(const char* pFieldName, FbxShort pDefault=0);
1076 
1078  FbxUShort FieldReadUShort();
1079 
1084  FbxUShort FieldReadUShort(const char* pFieldName, FbxUShort pDefault=0);
1085 
1087  unsigned int FieldReadUI();
1088 
1093  unsigned int FieldReadUI(const char* pFieldName, unsigned int pDefault=0);
1094 
1096  FbxULongLong FieldReadULL();
1097 
1102  FbxULongLong FieldReadULL(const char* pFieldName, FbxULongLong pDefault=0);
1103 
1107  const FbxChar* FieldReadArraySBytes( int &pCount );
1111  const FbxShort* FieldReadArrayShort ( int &pCount );
1115  const FbxUShort* FieldReadArrayUShort( int &pCount );
1119  const unsigned int* FieldReadArrayUI ( int &pCount );
1123  const FbxULongLong* FieldReadArrayULL ( int &pCount );
1124 
1128  const FbxChar* FieldReadArray(int &pCount, const FbxChar*);
1135  const FbxShort* FieldReadArray(int &pCount, const FbxShort*);
1139  const FbxUShort* FieldReadArray(int &pCount, const FbxUShort*);
1143  const unsigned int* FieldReadArray(int &pCount, const unsigned int*);
1147  const FbxULongLong* FieldReadArray(int &pCount, const FbxULongLong*);
1149 
1158  virtual bool FieldReadEmbeddedFile (FbxString& pFileName, FbxString& pRelativeFileName, const char* pEmbeddedMediaDirectory = "", bool *pIsFileCreated=NULL);
1159 
1163  const double* FieldReadArrayD( int &pCount );
1167  const float* FieldReadArrayF( int &pCount );
1171  const int* FieldReadArrayI( int &pCount );
1175  const FbxLongLong*FieldReadArrayLL(int &pCount );
1179  const bool* FieldReadArrayB( int &pCount );
1183  const FbxUChar* FieldReadArrayBytes( int &pCount );
1184 
1188  const int* FieldReadArray(int& pCount, const int*);
1192  const float* FieldReadArray(int& pCount, const float*);
1196  const double* FieldReadArray(int& pCount, const double*);
1200  const FbxLongLong* FieldReadArray(int& pCount, const FbxLongLong*);
1204  const bool* FieldReadArray(int& pCount, const bool*);
1208  const FbxUChar* FieldReadArray(int& pCount, const FbxUChar*);
1209 
1211 
1217 
1221  void FieldWriteBegin(const char* pFieldName);
1222 
1224  void FieldWriteEnd();
1225 
1227  void FieldWriteBlockBegin();
1228 
1234  void FieldWriteObjectBegin(const char* pObjectType, const char* pName, const char* pSubType=NULL);
1235 
1237  void FieldWriteObjectEnd();
1238 
1243  void FieldWriteBlockBegin(const char* pFileName);
1244 
1246  void FieldWriteBlockEnd ();
1247 
1251  void FieldWriteCH(char pValue);
1252 
1257  void FieldWriteCH(const char* pFieldName, char pValue);
1258 
1262  void FieldWriteC(const char* pValue);
1263 
1268  void FieldWriteC(const char* pFieldName, const char* pValue);
1269 
1273  void FieldWriteS(const char* pValue);
1274 
1278  void FieldWriteS(const FbxString& pValue);
1279 
1284  void FieldWriteS(const char* pFieldName, const char* pValue);
1285 
1290  void FieldWriteS(const char* pFieldName, const FbxString& pValue);
1291 
1295  void FieldWriteB(bool pValue);
1296 
1301  void FieldWriteB(const char* pFieldName, bool pValue);
1302 
1306  void FieldWriteI(int pValue);
1307 
1312  void FieldWriteI(const char* pFieldName, int pValue);
1313 
1317  void FieldWriteLL(FbxLongLong pValue);
1318 
1323  void FieldWriteLL(const char* pFieldName, FbxLongLong pValue);
1324 
1329  void FieldWriteF(float pValue);
1330 
1336  void FieldWriteF(const char* pFieldName, float pValue);
1337 
1341  void FieldWriteD(double pValue);
1342 
1347  void FieldWriteD(const char* pFieldName, double pValue);
1348 
1352  void FieldWriteT(FbxTime pTime);
1353 
1358  void FieldWriteT(const char* pFieldName,FbxTime pValue);
1359 
1363  void FieldWriteTS(FbxTimeSpan pTimeSpan);
1364 
1369  void FieldWriteTS(const char* pFieldName,FbxTimeSpan pValue);
1370 
1375  void FieldWriteFn(const float* pValue, FbxUInt pn);
1376 
1382  void FieldWriteFn(const char* pFieldName, const float* pValue, FbxUInt pn);
1383 
1387  void FieldWrite3F(const float* pValue);
1388 
1393  void FieldWrite3F(const char* pFieldName, const float* pValue);
1394 
1398  void FieldWrite4F(const float* pValue);
1399 
1404  void FieldWrite4F(const char* pFieldName, const float* pValue);
1405 
1410  void FieldWriteDn(const double* pValue, FbxUInt pn);
1411 
1417  void FieldWriteDn(const char* pFieldName, const double* pValue, FbxUInt pn);
1418 
1422  void FieldWrite3D(const double* pValue);
1423 
1428  void FieldWrite3D(const char* pFieldName, const double* pValue);
1429 
1433  void FieldWrite4D(const double* pValue);
1434 
1439  void FieldWrite4D(const char* pFieldName, const double* pValue);
1440 
1441  // The maximum number of value entries is, in theory, 2**32. In practice it should be a lot less than that.
1442  // pSize is the number of values to write from each pointer location, and stride is how much we
1443  // advance to get to the next value; if the stride is zero, values are tighly packed together.
1444  // So in total we'll write n * pSize items.
1445 
1452  void FieldWriteArrayD( int n, const double* pValue, int pSize = 1, int pStride = 0 );
1459  void FieldWriteArrayF( int n, const float* pValue, int pSize = 1, int pStride = 0 );
1466  void FieldWriteArrayI( int n, const int* pValue, int pSize = 1, int pStride = 0 );
1473  void FieldWriteArrayLL(int n, const FbxLongLong* pValue, int pSize = 1, int pStride = 0 );
1480  void FieldWriteArrayB( int n, const bool* pValue, int pSize = 1, int pStride = 0 );
1487  void FieldWriteArrayBytes( int n, const FbxUChar* pValue, int pSize = 1, int pStride = 0 );
1488 
1493  void FieldWriteR(const void* pRawData, int pByteSize);
1494 
1500  void FieldWriteR(const char* pFieldName, const void* pRawData, int pByteSize);
1501 
1506 
1510  void FieldWriteByte(FbxChar pValue);
1511 
1516  void FieldWriteByte(const char* pFieldName, FbxChar pValue);
1517 
1521  void FieldWriteUByte(FbxUChar pValue);
1522 
1527  void FieldWriteUByte(const char* pFieldName, FbxUChar pValue);
1528 
1532  void FieldWriteShort(FbxShort pValue);
1533 
1538  void FieldWriteShort(const char* pFieldName, FbxShort pValue);
1539 
1543  void FieldWriteUShort(FbxUShort pValue);
1544 
1549  void FieldWriteUShort(const char* pFieldName, FbxUShort pValue);
1550 
1554  void FieldWriteUI(unsigned int pValue);
1555 
1560  void FieldWriteUI(const char* pFieldName, unsigned int pValue);
1561 
1565  void FieldWriteULL(FbxULongLong pValue);
1566 
1572  void FieldWriteULL(const char* pFieldName, FbxULongLong pValue);
1573 
1580  void FieldWriteArraySBytes( int n, const FbxChar* pValue, int pSize = 1, int pStride = 0 );
1587  void FieldWriteArrayShort( int n, const FbxShort* pValue, int pSize = 1, int pStride = 0 );
1594  void FieldWriteArrayUShort( int n, const FbxUShort* pValue, int pSize = 1, int pStride = 0 );
1601  void FieldWriteArrayUI( int n, const unsigned int* pValue, int pSize = 1, int pStride = 0 );
1608  void FieldWriteArrayULL(int n, const FbxULongLong* pValue, int pSize = 1, int pStride = 0 );
1610 
1614  int GetFieldRMaxChunkSize() const;
1615 
1619  void FieldWriteObjectReference(const char* pName);
1620 
1625  void FieldWriteObjectReference(const char* pFieldName, const char* pName);
1626 
1633  bool FieldWriteEmbeddedFile (FbxString pFileName, FbxString pRelativeFileName);
1634 
1638  void WriteComments(const char* pFieldName);
1639 
1641 
1642 #ifdef _DEBUG
1643  // Dump function for debugging purpose only
1644  void StdoutDump();
1645 #endif
1646 
1654  bool GetHaveLoadedEmbededFile() const;
1655 
1660  void GetMemoryFileInfo(void** pMemPtr, size_t& pSize) const;
1661 
1665  bool IsBeforeVersion6() const;
1666 
1670  void SetIsBeforeVersion6(bool pIsBeforeVersion6);
1671 
1672 /*****************************************************************************************************************************
1673 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
1674 *****************************************************************************************************************************/
1675 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1676  bool ProjectOpen (FbxFile * pFile, FbxReader* pReader, bool pCheckCRC = false, bool pOpenMainSection = true, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
1677  FbxStatus& GetStatus() { return mStatus; }
1678 
1679 private:
1680  // to resolve warning C4512: 'class' : assignment operator could not be generated
1681  FbxIO& operator=(const FbxIO& pOther);
1682 
1683  FbxStatus& mStatus;
1684 
1685  struct InternalImpl;
1686  struct InternalImpl32;
1687  struct InternalImpl64;
1688  InternalImpl* mImpl;
1689 
1691 
1692  void ProjectClear();
1693  void ProjectReset();
1694 
1695  bool ProjectReadHeader(bool pCheckASCIIHeader, bool pCheckCRC, bool pOpenMainSection, FbxIOFileHeaderInfo* pFileHeaderInfo);
1696  bool ProjectReadExtendedHeader(FbxInt64& pExtendedHeaderEnd, FbxIOFileHeaderInfo* pFileHeaderInfo);
1697  bool BinaryReadHeader();
1698  bool BinaryReadSectionPosition();
1699  bool ASCIIReadHeader();
1700  bool ASCIIReadSectionPosition();
1701 
1702  bool ProjectWriteHeader(FbxIOFileHeaderInfo* pFileHeaderInfo);
1703  bool ProjectWriteExtendedHeader(FbxIOFileHeaderInfo* pFileHeaderInfo);
1704  void BinaryWriteHeader();
1705  void ASCIIWriteHeader();
1706 
1707  void ReadEncryptionKey(char* pEncryptionKey);
1708  void WriteEncryptionKey(char* pEncryptionKey);
1709 
1711 
1712  bool ProjectClearSection();
1713  bool ProjectOpenSection(int pSection);
1714  bool BinaryReadSectionHeader();
1715  FbxInt64 BinaryReadSectionFooter(char* pSourceCheck);
1716  bool BinaryReadExtensionCode(FbxInt64 pFollowingSectionStart, FbxInt64& pSectionStart, FbxUInt32& pSectionVersion);
1717  void BinaryReadSectionPassword();
1718 
1719  bool ProjectWriteSectionHeader();
1720  void BinaryWriteSectionFooter();
1721  bool BinaryWriteExtensionCode(FbxInt64 pSectionStart, FbxUInt32 pSectionVersion);
1722 
1723  FbxString GetCreationTime() const;
1724  void SetCreationTime(FbxString pCreationTime);
1725  void CreateSourceCheck(char* lSourceCheck);
1726  bool TestSourceCheck(char* pSourceCheck, char* pSourceCompany);
1727  FbxString GetMangledCreationTime();
1728  void EncryptSourceCheck(char* pSourceCheck, char* pEncryptionData);
1729  void DecryptSourceCheck(char* pSourceCheck, const char* pEncryptionData);
1730 
1731  void EncryptPasswordV1(FbxString pOriginalPassword, FbxString &pEncryptedPassword);
1732  void DecryptPasswordV1(FbxString pEncryptedPassword, FbxString &pDecryptedPassword);
1733 
1735 
1736  void CheckValidityOfFieldName(const char* pFieldName);
1737  void GetUnusedEmbeddedName(const FbxString& pDirectory, const FbxString& pName, FbxString& pResult, bool pCreateSubdirectory);
1738 
1740  FbxString GetDirectory(bool pAutoCreate, const char* pExtension);
1741 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
1742 };
1743 
1744 #include <fbxsdk/fbxsdk_nsend.h>
1745 
1746 #endif /* _FBXSDK_FILEIO_FBX_IO_H_ */
FbxUInt64 FbxULongLong
Definition: fbxtypes.h:93
unsigned int FbxUInt
Definition: fbxtypes.h:40
FbxLocalTime mCreationTimeStamp
Indicates whether the mCreationTimeStamp member variable contains the actual creation time of the fil...
Definition: fbxio.h:269
FbxAutoResetXRefManager(FbxIO *pFbx, FbxXRefManager &pXRefManager)
Default constructor.
Definition: fbxio.h:338
FBX SDK environment definition.
const FbxXRefManager * ProjectGetXRefManager() const
Get the XRef Manager to use.
~FbxAutoResetXRefManager()
Destructor.
Definition: fbxio.h:350
FbxString mResolutionMode
resolution mode.
Definition: fbxio.h:198
Abstract class for implementing I/O operations through a stream of data.
Definition: fbxstream.h:26
#define NULL
Definition: fbxarch.h:210
bool mPLE
The flag indicates that the header was created by a personal learning edition (PLE) of FBX...
Definition: fbxio.h:280
Utility class to manipulate strings.
Definition: fbxstring.h:66
Base class of other readers used internally.
Definition: fbxreader.h:64
bool mCreationTimeStampPresent
Indicates whether a creation time stamp is preset.
Definition: fbxio.h:266
This class facilitates the testing/reporting of errors.
Definition: fbxstatus.h:26
unsigned short FbxUShort
Definition: fbxtypes.h:38
double mResolutionW
resolution width.
Definition: fbxio.h:200
unsigned char FbxUChar
Definition: fbxtypes.h:36
int FbxFileVersionStrToInt(const char *pFileVersion)
Convert the FBX file version string to an integral number for <= or >= tests purposes.
void ProjectSetXRefManager(const FbxXRefManager *)
Provide the XRef Manager to use to create the .fbm folder.
Class to encapsulate time units.
Definition: fbxtime.h:44
signed short FbxShort
Definition: fbxtypes.h:37
Render and resolution information.
Definition: fbxio.h:190
FbxString mCreator
Indicates who is the creator of the file Ex: "FBX SDK/FBX Plugins version 2011.2".
Definition: fbxio.h:274
indicate not in a valid section
Definition: fbxio.h:182
Base class of other writers used internally.
Definition: fbxwriter.h:58
This class manages external references to files.
Definition: fbxxref.h:30
static FbxIO * Create(BinaryType pBinaryType, FbxStatus &pStatus)
Creation function for this FbxIO class.
Definition: fbxio.h:369
const FbxXRefManager * mXRefManager
Definition: fbxio.h:335
double mResolutionH
resolution height.
Definition: fbxio.h:202
indicate currently in the main section
Definition: fbxio.h:183
signed long long FbxInt64
Definition: fbxtypes.h:81
signed char FbxChar
Definition: fbxtypes.h:35
FBX header information used at beginning of the FBX file to get or set important values like the file...
Definition: fbxio.h:225
indicate currently in the extention section 0
Definition: fbxio.h:184
FbxIODefaultRenderResolution mDefaultRenderResolution
FbxIODefaultRenderResolution to handle default resolution values.
Definition: fbxio.h:254
FbxIO represents an FBX file.
Definition: fbxio.h:326
#define FBXSDK_DLL
Definition: fbxarch.h:173
FbxString mCameraName
camera name.
Definition: fbxio.h:196
int mFileVersion
Read only properties (not used for file write)
Definition: fbxio.h:263
unsigned int FbxUInt32
Definition: fbxtypes.h:80
Class for interfacing with files, providing a similar interface for files independant of the OS or fi...
Definition: fbxfile.h:27
Class to encapsulate time intervals.
Definition: fbxtime.h:508
BinaryType
Definition: fbxio.h:359
bool mIsOK
If the resolution data is ready.
Definition: fbxio.h:194
bool mIOPlugin
Indicates whether the file is created by a genuine Autodesk plug-in or not.
Definition: fbxio.h:277
FbxInt64 FbxLongLong
Definition: fbxtypes.h:92
unsigned long FbxULong
Definition: fbxtypes.h:90