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 
159 //Default file version number used when writing new FBX files
160 #define FBX_DEFAULT_FILE_VERSION FBX_FILE_VERSION_7500
161 #define FBX_DEFAULT_FILE_COMPATIBILITY FBX_2018_00_COMPATIBLE
162 
176 FBXSDK_DLL int FbxFileVersionStrToInt(const char* pFileVersion);
177 
179 enum
180 {
184 };
185 
190 {
191 public:
193  bool mIsOK;
199  double mResolutionW;
201  double mResolutionH;
202 
210 
215  void Reset();
218 };
219 
225 {
226 public:
233 
235  virtual ~FbxIOFileHeaderInfo();
237 
242 
244  virtual void Reset();
245 
249  virtual bool ReadExtendedHeaderInformation(FbxIO*);
251 
254 
256 
258 
263 
266 
269 
274 
276  bool mIOPlugin;
277 
279  bool mPLE;
281 };
282 
326 {
327 public:
328 
332  {
335 
338  : mFbx(pFbx)
339  , mXRefManager(NULL)
340  {
341  if( mFbx )
342  {
343  mXRefManager = mFbx->ProjectGetXRefManager();
344  mFbx->ProjectSetXRefManager(&pXRefManager);
345  }
346  }
347 
350  {
351  if( mFbx )
352  {
353  mFbx->ProjectSetXRefManager(mXRefManager);
354  }
355  }
356  };
357 
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  };
363 
368  static FbxIO* Create(BinaryType pBinaryType, FbxStatus& pStatus){ return FbxNew< FbxIO >(pBinaryType, pStatus); }
369 
371  FbxIO(BinaryType pBinaryType, FbxStatus& pStatus);
372 
374  virtual ~FbxIO();
375 
382 
392  bool ProjectOpen(void* pAddress, FbxULong pMaxLength, FbxReader* pReader, bool pCheckCRC = false, bool pOpenMainSection = true, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
393 
402  bool ProjectOpen(const char* pName, FbxReader* pReader, bool pCheckCRC = false, bool pOpenMainSection = true, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
403 
413  bool ProjectOpen(FbxStream* pStream, void* pStreamData, FbxReader* pReader, bool pCheckCRC = false, bool pOpenMainSection = true, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
414 
423  bool ProjectOpenDirect(const char* pName, FbxReader* pReader, bool pCheckCRC = false, bool pOpenMainSection = true, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
424 
434  bool ProjectCreate(void* pAddress, FbxUInt pSize, FbxWriter* pWriter, bool pBinary, bool pEncrypted, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
435 
444  bool ProjectCreate(const char* pName, FbxWriter* pWriter, bool pBinary, bool pEncrypted, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
445 
455  bool ProjectCreate(FbxStream* pStream, void* pStreamData, FbxWriter* pWriter, bool pBinary, bool pEncrypted, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
456 
465  bool ProjectCreateDirect(const char* pName, FbxWriter* pWriter, bool pBinary, bool pEncrypted, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
466 
475  bool ProjectCreateEmpty(const char* pName, FbxWriter* pWriter, int pVersion, bool pBinary, bool pEncrypted);
476 
486  bool ProjectCreateEmpty(FbxStream* pStream, void* pStreamData, FbxWriter* pWriter, int pVersion, bool pBinary, bool pEncrypted);
487 
491  bool ProjectWrite_BeginFileHeader();
492 
496  bool ProjectWrite_BeginExtendedHeader();
497 
502  bool ProjectWrite_WriteExtendedHeader(const FbxIOFileHeaderInfo* pExtendedHeader);
503 
507  bool ProjectWrite_EndExtendedHeader();
508 
512  bool ProjectWrite_EndFileHeader();
513 
519  bool ProjectClose(void** pData=0, size_t* pSize=0);
520 
524  void ProjectSetXRefManager(const FbxXRefManager*);
525 
529  const FbxXRefManager* ProjectGetXRefManager() const;
530 
545  bool ProjectCreateEmbeddedFolder(const FbxXRefManager& pXRefManager, FbxString& pCreatedFolder, const char* pUserDefinedFolder = NULL);
546 
550  void SetEmbedded(bool pValue);
551 
555  void SetEmbeddingExtractionFolder(const char* pExtractionFolder);
556 
559  const char* GetEmbeddingExtractionFolder();
560 
564  bool IsEmbedded() const;
565 
569  bool IsBinary() const;
570 
574  bool IsEncrypted () const;
575 
579  bool CheckCRC();
580 
584  FbxUInt32 GetFileVersionNumber() const;
585 
589  void CacheSize(FbxUInt32 pCacheSize);
590 
594  FbxUInt32 CacheSize() const;
595 
597 
608 
610  bool Fbx7Support() const;
611 
615  void Fbx7Support(bool pSupport);
616 
618  bool CompressArrays() const;
619 
623  void CompressArrays(bool pCompress);
624 
626  int CompressMinimumSize() const;
627 
631  void CompressMinimumSize(int pSize);
632 
634  int CompressLevel() const;
635 
641  void CompressLevel(int pLevel);
643 
649 
653  bool ProjectOpenMainSection();
654 
658  int ProjectGetExtensionSectionCount() const;
659 
664  bool ProjectOpenExtensionSection(int pExtensionSectionIndex);
665 
670  bool ProjectCreateExtensionSection(bool pOverwriteLastExtensionSection = false);
671 
674  void ProjectCloseSection();
675 
679  int ProjectGetCurrentSection() const;
680 
684  int ProjectGetCurrentSectionMode() const;
685 
689  int ProjectGetCurrentSectionVersion() const;
690 
698  int ProjectGetSectionVersion(int pSection) const;
699 
706  static void ProjectConvertVersionNumber(int pVersion, int& pMajor, int& pMinor, int& pRevision);
707 
711  bool IsPasswordProtected() const;
712 
718  bool CheckPassword(const char* pPassword);
719 
726  bool WritePassword(const char* pPassword);
727 
729 
734 
738  const char* GetFilename() const;
739 
744  FbxString GetDataDirectory(bool pAutoCreate = true);
745 
754  FbxString GetMediaDirectory(bool pCreate = false, const char* pUserDefinedFolder = NULL);
755 
761  FbxString GetContainerTemplateDirectory(const char* pTemplateName, bool pCreate);
762 
767  char* GetRelativePath(const char* pPath);
768 
773  char* GetRelativeFilePath(const char* pFilePath);
774 
779  char* GetFullPath(const char* pRelativePath);
780 
785  char* GetFullFilePath(const char* pRelativeFilePath);
786 
791  char* GetTmpProjectName(const char* pName) const;
792 
799  bool SwapFromTmpProject(const char* pName, char* pError=NULL, int pErrorSize=0);
800 
802 
808 
811  void FieldReadResetPosition();
812 
816  int FieldGetCount() const;
817 
822  const char* FieldGetName(int pFieldIndex) const;
823 
828  int FieldGetInstanceCount(const char* pFieldName) const;
829 
835  bool FieldReadBegin(int pFieldIndex, int pInstance);
836 
841  bool FieldReadBegin(const char* pFieldName);
842 
848  bool FieldReadBegin(const char* pFieldName, int pInstance);
849 
851  void FieldReadEnd();
852 
854  bool FieldReadIsBlock();
855 
857  bool FieldReadBlockBegin();
858 
860  void FieldReadBlockEnd();
861 
863  int FieldReadGetCount() const;
864 
866  int FieldReadGetRemain() const;
867 
869  char FieldReadGetType() const;
870 
872  char FieldReadCH();
873 
878  char FieldReadCH(const char* pFieldName, char pDefault=0);
879 
881  const char* FieldReadC();
882 
887  const char* FieldReadC(const char* pFieldName, const char* pDefault="");
888 
890  const char* FieldReadS();
891 
896  const char* FieldReadS(const char* pFieldName, const char* pDefault="");
897 
899  bool FieldReadB();
900 
905  bool FieldReadB(const char* pFieldName, bool pDefault = false);
906 
908  int FieldReadI();
909 int FieldReadI(const char* pFieldName, int pDefault=0);
914 
916  FbxLongLong FieldReadLL();
917 
922  FbxLongLong FieldReadLL(const char* pFieldName, FbxLongLong pDefault=0);
923 
925  float FieldReadF();
926 
931  float FieldReadF(const char* pFieldName, float pDefault=0);
932 
934  double FieldReadD();
935 
940  double FieldReadD(const char* pFieldName, double pDefault=0);
941 
945  FbxTime FieldReadT(const char* pFieldName);
946 
948  FbxTime FieldReadT();
949 
953  FbxTimeSpan FieldReadTS(const char* pFieldName);
954 
956  FbxTimeSpan FieldReadTS();
957 
962  void FieldReadFn(float* pValue, FbxUInt pn);
963 
967  void FieldRead3F(float* pValue);
968 
972  void FieldRead4F(float* pValue);
973 
980  void FieldReadFn(const char* pFieldName, float* pValue, const float *pDefault, FbxUInt pn);
981 
987  void FieldRead3F(const char* pFieldName, float* pValue, const float* pDefault=NULL);
988 
994  void FieldRead4F(const char* pFieldName, float* pValue, const float* pDefault=NULL);
995 
1000  void FieldReadDn(double* pValue, FbxUInt pn);
1001 
1005  void FieldRead3D(double* pValue);
1006 
1010  void FieldRead4D(double* pValue);
1011 
1018  void FieldReadDn(const char* pFieldName, double* pValue, const double *pDefault, FbxUInt pn);
1019 
1025  void FieldRead3D(const char* pFieldName, double* pValue, const double* pDefault=NULL);
1026 
1032  void FieldRead4D(const char* pFieldName, double* pValue, const double* pDefault=NULL);
1033 
1037  void* FieldReadR(int* pByteSize);
1038 
1043  void* FieldReadR(const char* pFieldName,int* pByteSize);
1044 
1049  FbxChar FieldReadByte();
1051 
1056  FbxChar FieldReadByte(const char* pFieldName, FbxChar pDefault=0);
1057 
1059  FbxUChar FieldReadUByte();
1060 
1065  FbxUChar FieldReadUByte(const char* pFieldName, FbxUChar pDefault=0);
1066 
1068  FbxShort FieldReadShort();
1069 
1074  FbxShort FieldReadShort(const char* pFieldName, FbxShort pDefault=0);
1075 
1077  FbxUShort FieldReadUShort();
1078 
1083  FbxUShort FieldReadUShort(const char* pFieldName, FbxUShort pDefault=0);
1084 
1086  unsigned int FieldReadUI();
1087 
1092  unsigned int FieldReadUI(const char* pFieldName, unsigned int pDefault=0);
1093 
1095  FbxULongLong FieldReadULL();
1096 
1101  FbxULongLong FieldReadULL(const char* pFieldName, FbxULongLong pDefault=0);
1102 
1106  const FbxChar* FieldReadArraySBytes( int &pCount );
1110  const FbxShort* FieldReadArrayShort ( int &pCount );
1114  const FbxUShort* FieldReadArrayUShort( int &pCount );
1118  const unsigned int* FieldReadArrayUI ( int &pCount );
1122  const FbxULongLong* FieldReadArrayULL ( int &pCount );
1123 
1127  const FbxChar* FieldReadArray(int &pCount, const FbxChar*);
1134  const FbxShort* FieldReadArray(int &pCount, const FbxShort*);
1138  const FbxUShort* FieldReadArray(int &pCount, const FbxUShort*);
1142  const unsigned int* FieldReadArray(int &pCount, const unsigned int*);
1146  const FbxULongLong* FieldReadArray(int &pCount, const FbxULongLong*);
1148 
1157  virtual bool FieldReadEmbeddedFile (FbxString& pFileName, FbxString& pRelativeFileName, const char* pEmbeddedMediaDirectory = "", bool *pIsFileCreated=NULL);
1158 
1162  const double* FieldReadArrayD( int &pCount );
1166  const float* FieldReadArrayF( int &pCount );
1170  const int* FieldReadArrayI( int &pCount );
1174  const FbxLongLong*FieldReadArrayLL(int &pCount );
1178  const bool* FieldReadArrayB( int &pCount );
1182  const FbxUChar* FieldReadArrayBytes( int &pCount );
1183 
1187  const int* FieldReadArray(int& pCount, const int*);
1191  const float* FieldReadArray(int& pCount, const float*);
1195  const double* FieldReadArray(int& pCount, const double*);
1199  const FbxLongLong* FieldReadArray(int& pCount, const FbxLongLong*);
1203  const bool* FieldReadArray(int& pCount, const bool*);
1207  const FbxUChar* FieldReadArray(int& pCount, const FbxUChar*);
1208 
1210 
1216 
1220  void FieldWriteBegin(const char* pFieldName);
1221 
1223  void FieldWriteEnd();
1224 
1226  void FieldWriteBlockBegin();
1227 
1233  void FieldWriteObjectBegin(const char* pObjectType, const char* pName, const char* pSubType=NULL);
1234 
1236  void FieldWriteObjectEnd();
1237 
1242  void FieldWriteBlockBegin(const char* pFileName);
1243 
1245  void FieldWriteBlockEnd ();
1246 
1250  void FieldWriteCH(char pValue);
1251 
1256  void FieldWriteCH(const char* pFieldName, char pValue);
1257 
1261  void FieldWriteC(const char* pValue);
1262 
1267  void FieldWriteC(const char* pFieldName, const char* pValue);
1268 
1272  void FieldWriteS(const char* pValue);
1273 
1277  void FieldWriteS(const FbxString& pValue);
1278 
1283  void FieldWriteS(const char* pFieldName, const char* pValue);
1284 
1289  void FieldWriteS(const char* pFieldName, const FbxString& pValue);
1290 
1294  void FieldWriteB(bool pValue);
1295 
1300  void FieldWriteB(const char* pFieldName, bool pValue);
1301 
1305  void FieldWriteI(int pValue);
1306 
1311  void FieldWriteI(const char* pFieldName, int pValue);
1312 
1316  void FieldWriteLL(FbxLongLong pValue);
1317 
1322  void FieldWriteLL(const char* pFieldName, FbxLongLong pValue);
1323 
1328  void FieldWriteF(float pValue);
1329 
1335  void FieldWriteF(const char* pFieldName, float pValue);
1336 
1340  void FieldWriteD(double pValue);
1341 
1346  void FieldWriteD(const char* pFieldName, double pValue);
1347 
1351  void FieldWriteT(FbxTime pTime);
1352 
1357  void FieldWriteT(const char* pFieldName,FbxTime pValue);
1358 
1362  void FieldWriteTS(FbxTimeSpan pTimeSpan);
1363 
1368  void FieldWriteTS(const char* pFieldName,FbxTimeSpan pValue);
1369 
1374  void FieldWriteFn(const float* pValue, FbxUInt pn);
1375 
1381  void FieldWriteFn(const char* pFieldName, const float* pValue, FbxUInt pn);
1382 
1386  void FieldWrite3F(const float* pValue);
1387 
1392  void FieldWrite3F(const char* pFieldName, const float* pValue);
1393 
1397  void FieldWrite4F(const float* pValue);
1398 
1403  void FieldWrite4F(const char* pFieldName, const float* pValue);
1404 
1409  void FieldWriteDn(const double* pValue, FbxUInt pn);
1410 
1416  void FieldWriteDn(const char* pFieldName, const double* pValue, FbxUInt pn);
1417 
1421  void FieldWrite3D(const double* pValue);
1422 
1427  void FieldWrite3D(const char* pFieldName, const double* pValue);
1428 
1432  void FieldWrite4D(const double* pValue);
1433 
1438  void FieldWrite4D(const char* pFieldName, const double* pValue);
1439 
1440  // The maximum number of value entries is, in theory, 2**32. In practice it should be a lot less than that.
1441  // pSize is the number of values to write from each pointer location, and stride is how much we
1442  // advance to get to the next value; if the stride is zero, values are tighly packed together.
1443  // So in total we'll write n * pSize items.
1444 
1451  void FieldWriteArrayD( int n, const double* pValue, int pSize = 1, int pStride = 0 );
1458  void FieldWriteArrayF( int n, const float* pValue, int pSize = 1, int pStride = 0 );
1465  void FieldWriteArrayI( int n, const int* pValue, int pSize = 1, int pStride = 0 );
1472  void FieldWriteArrayLL(int n, const FbxLongLong* pValue, int pSize = 1, int pStride = 0 );
1479  void FieldWriteArrayB( int n, const bool* pValue, int pSize = 1, int pStride = 0 );
1486  void FieldWriteArrayBytes( int n, const FbxUChar* pValue, int pSize = 1, int pStride = 0 );
1487 
1492  void FieldWriteR(const void* pRawData, int pByteSize);
1493 
1499  void FieldWriteR(const char* pFieldName, const void* pRawData, int pByteSize);
1500 
1505 
1509  void FieldWriteByte(FbxChar pValue);
1510 
1515  void FieldWriteByte(const char* pFieldName, FbxChar pValue);
1516 
1520  void FieldWriteUByte(FbxUChar pValue);
1521 
1526  void FieldWriteUByte(const char* pFieldName, FbxUChar pValue);
1527 
1531  void FieldWriteShort(FbxShort pValue);
1532 
1537  void FieldWriteShort(const char* pFieldName, FbxShort pValue);
1538 
1542  void FieldWriteUShort(FbxUShort pValue);
1543 
1548  void FieldWriteUShort(const char* pFieldName, FbxUShort pValue);
1549 
1553  void FieldWriteUI(unsigned int pValue);
1554 
1559  void FieldWriteUI(const char* pFieldName, unsigned int pValue);
1560 
1564  void FieldWriteULL(FbxULongLong pValue);
1565 
1571  void FieldWriteULL(const char* pFieldName, FbxULongLong pValue);
1572 
1579  void FieldWriteArraySBytes( int n, const FbxChar* pValue, int pSize = 1, int pStride = 0 );
1586  void FieldWriteArrayShort( int n, const FbxShort* pValue, int pSize = 1, int pStride = 0 );
1593  void FieldWriteArrayUShort( int n, const FbxUShort* pValue, int pSize = 1, int pStride = 0 );
1600  void FieldWriteArrayUI( int n, const unsigned int* pValue, int pSize = 1, int pStride = 0 );
1607  void FieldWriteArrayULL(int n, const FbxULongLong* pValue, int pSize = 1, int pStride = 0 );
1609 
1613  int GetFieldRMaxChunkSize() const;
1614 
1618  void FieldWriteObjectReference(const char* pName);
1619 
1624  void FieldWriteObjectReference(const char* pFieldName, const char* pName);
1625 
1632  bool FieldWriteEmbeddedFile (FbxString pFileName, FbxString pRelativeFileName);
1633 
1637  void WriteComments(const char* pFieldName);
1638 
1640 
1641 #ifdef _DEBUG
1642  // Dump function for debugging purpose only
1643  void StdoutDump();
1644 #endif
1645 
1653  bool GetHaveLoadedEmbededFile() const;
1654 
1659  void GetMemoryFileInfo(void** pMemPtr, size_t& pSize) const;
1660 
1664  bool IsBeforeVersion6() const;
1665 
1669  void SetIsBeforeVersion6(bool pIsBeforeVersion6);
1670 
1671 /*****************************************************************************************************************************
1672 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
1673 *****************************************************************************************************************************/
1674 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1675  bool ProjectOpen (FbxFile * pFile, FbxReader* pReader, bool pCheckCRC = false, bool pOpenMainSection = true, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
1676  FbxStatus& GetStatus() { return mStatus; }
1677 
1678 private:
1679  // to resolve warning C4512: 'class' : assignment operator could not be generated
1680  FbxIO& operator=(const FbxIO& pOther);
1681 
1682  FbxStatus& mStatus;
1683 
1684  struct InternalImpl;
1685  struct InternalImpl32;
1686  struct InternalImpl64;
1687  InternalImpl* mImpl;
1688 
1690 
1691  void ProjectClear();
1692  void ProjectReset();
1693 
1694  bool ProjectReadHeader(bool pCheckASCIIHeader, bool pCheckCRC, bool pOpenMainSection, FbxIOFileHeaderInfo* pFileHeaderInfo);
1695  bool ProjectReadExtendedHeader(FbxInt64& pExtendedHeaderEnd, FbxIOFileHeaderInfo* pFileHeaderInfo);
1696  bool BinaryReadHeader();
1697  bool BinaryReadSectionPosition();
1698  bool ASCIIReadHeader();
1699  bool ASCIIReadSectionPosition();
1700 
1701  bool ProjectWriteHeader(FbxIOFileHeaderInfo* pFileHeaderInfo);
1702  bool ProjectWriteExtendedHeader(FbxIOFileHeaderInfo* pFileHeaderInfo);
1703  void BinaryWriteHeader();
1704  void ASCIIWriteHeader();
1705 
1706  void ReadEncryptionKey(char* pEncryptionKey);
1707  void WriteEncryptionKey(char* pEncryptionKey);
1708 
1710 
1711  bool ProjectClearSection();
1712  bool ProjectOpenSection(int pSection);
1713  bool BinaryReadSectionHeader();
1714  FbxInt64 BinaryReadSectionFooter(char* pSourceCheck);
1715  bool BinaryReadExtensionCode(FbxInt64 pFollowingSectionStart, FbxInt64& pSectionStart, FbxUInt32& pSectionVersion);
1716  void BinaryReadSectionPassword();
1717 
1718  bool ProjectWriteSectionHeader();
1719  void BinaryWriteSectionFooter();
1720  bool BinaryWriteExtensionCode(FbxInt64 pSectionStart, FbxUInt32 pSectionVersion);
1721 
1722  FbxString GetCreationTime() const;
1723  void SetCreationTime(FbxString pCreationTime);
1724  void CreateSourceCheck(char* lSourceCheck);
1725  bool TestSourceCheck(char* pSourceCheck, char* pSourceCompany);
1726  FbxString GetMangledCreationTime();
1727  void EncryptSourceCheck(char* pSourceCheck, char* pEncryptionData);
1728  void DecryptSourceCheck(char* pSourceCheck, const char* pEncryptionData);
1729 
1730  void EncryptPasswordV1(FbxString pOriginalPassword, FbxString &pEncryptedPassword);
1731  void DecryptPasswordV1(FbxString pEncryptedPassword, FbxString &pDecryptedPassword);
1732 
1734 
1735  void CheckValidityOfFieldName(const char* pFieldName);
1736  void GetUnusedEmbeddedName(const FbxString& pDirectory, const FbxString& pName, FbxString& pResult, bool pCreateSubdirectory);
1737 
1739  FbxString GetDirectory(bool pAutoCreate, const char* pExtension);
1740 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
1741 };
1742 
1743 #include <fbxsdk/fbxsdk_nsend.h>
1744 
1745 #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:268
FbxAutoResetXRefManager(FbxIO *pFbx, FbxXRefManager &pXRefManager)
Default constructor.
Definition: fbxio.h:337
FBX SDK environment definition.
const FbxXRefManager * ProjectGetXRefManager() const
Get the XRef Manager to use.
~FbxAutoResetXRefManager()
Destructor.
Definition: fbxio.h:349
FbxString mResolutionMode
resolution mode.
Definition: fbxio.h:197
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:279
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:265
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:199
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:189
FbxString mCreator
Indicates who is the creator of the file Ex: "FBX SDK/FBX Plugins version 2011.2".
Definition: fbxio.h:273
indicate not in a valid section
Definition: fbxio.h:181
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:368
const FbxXRefManager * mXRefManager
Definition: fbxio.h:334
double mResolutionH
resolution height.
Definition: fbxio.h:201
indicate currently in the main section
Definition: fbxio.h:182
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:224
indicate currently in the extention section 0
Definition: fbxio.h:183
FbxIODefaultRenderResolution mDefaultRenderResolution
FbxIODefaultRenderResolution to handle default resolution values.
Definition: fbxio.h:253
FbxIO represents an FBX file.
Definition: fbxio.h:325
#define FBXSDK_DLL
Definition: fbxarch.h:173
FbxString mCameraName
camera name.
Definition: fbxio.h:195
int mFileVersion
Read only properties (not used for file write)
Definition: fbxio.h:262
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:358
bool mIsOK
If the resolution data is ready.
Definition: fbxio.h:193
bool mIOPlugin
Indicates whether the file is created by a genuine Autodesk plug-in or not.
Definition: fbxio.h:276
FbxInt64 FbxLongLong
Definition: fbxtypes.h:92
unsigned long FbxULong
Definition: fbxtypes.h:90