fbxsdk/fileio/fbx/fbxio.h Source File

fbxio.h
Go to the documentation of this file.
1 /****************************************************************************************
2 
3  Copyright (C) 2015 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 
158 //Default file version number used when writing new FBX files
159 #define FBX_DEFAULT_FILE_VERSION FBX_FILE_VERSION_7500
160 #define FBX_DEFAULT_FILE_COMPATIBILITY FBX_2016_00_COMPATIBLE
161 
175 FBXSDK_DLL int FbxFileVersionStrToInt(const char* pFileVersion);
176 
178 enum
179 {
183 };
184 
189 {
190 public:
192  bool mIsOK;
198  double mResolutionW;
200  double mResolutionH;
201 
209 
214  void Reset();
217 };
218 
224 {
225 public:
232 
234  virtual ~FbxIOFileHeaderInfo();
236 
241 
243  virtual void Reset();
244 
248  virtual bool ReadExtendedHeaderInformation(FbxIO*);
250 
253 
255 
257 
262 
265 
268 
273 
275  bool mIOPlugin;
276 
278  bool mPLE;
280 };
281 
325 {
326 public:
327 
331  {
334 
337  : mFbx(pFbx)
338  , mXRefManager(NULL)
339  {
340  if( mFbx )
341  {
342  mXRefManager = mFbx->ProjectGetXRefManager();
343  mFbx->ProjectSetXRefManager(&pXRefManager);
344  }
345  }
346 
349  {
350  if( mFbx )
351  {
352  mFbx->ProjectSetXRefManager(mXRefManager);
353  }
354  }
355  };
356 
358  {
359  BinaryNormal, //<! Standard FBX file field alignment using 32bit values, used by all file format version 7.4.0 or lower
360  BinaryLarge //<! New FBX file field alignment using 64bit values, used by all file format version 7.5.0 or higher
361  };
362 
367  static FbxIO* Create(BinaryType pBinaryType, FbxStatus& pStatus){ return FbxNew< FbxIO >(pBinaryType, pStatus); }
368 
370  FbxIO(BinaryType pBinaryType, FbxStatus& pStatus);
371 
373  virtual ~FbxIO();
374 
381 
391  bool ProjectOpen(void* pAddress, FbxULong pMaxLength, FbxReader* pReader, bool pCheckCRC = false, bool pOpenMainSection = true, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
392 
401  bool ProjectOpen(const char* pName, FbxReader* pReader, bool pCheckCRC = false, bool pOpenMainSection = true, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
402 
412  bool ProjectOpen(FbxStream* pStream, void* pStreamData, FbxReader* pReader, bool pCheckCRC = false, bool pOpenMainSection = true, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
413 
422  bool ProjectOpenDirect(const char* pName, FbxReader* pReader, bool pCheckCRC = false, bool pOpenMainSection = true, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
423 
433  bool ProjectCreate(void* pAddress, FbxUInt pSize, FbxWriter* pWriter, bool pBinary, bool pEncrypted, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
434 
443  bool ProjectCreate(const char* pName, FbxWriter* pWriter, bool pBinary, bool pEncrypted, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
444 
454  bool ProjectCreate(FbxStream* pStream, void* pStreamData, FbxWriter* pWriter, bool pBinary, bool pEncrypted, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
455 
464  bool ProjectCreateDirect(const char* pName, FbxWriter* pWriter, bool pBinary, bool pEncrypted, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
465 
474  bool ProjectCreateEmpty(const char* pName, FbxWriter* pWriter, int pVersion, bool pBinary, bool pEncrypted);
475 
485  bool ProjectCreateEmpty(FbxStream* pStream, void* pStreamData, FbxWriter* pWriter, int pVersion, bool pBinary, bool pEncrypted);
486 
490  bool ProjectWrite_BeginFileHeader();
491 
495  bool ProjectWrite_BeginExtendedHeader();
496 
501  bool ProjectWrite_WriteExtendedHeader(const FbxIOFileHeaderInfo* pExtendedHeader);
502 
506  bool ProjectWrite_EndExtendedHeader();
507 
511  bool ProjectWrite_EndFileHeader();
512 
518  bool ProjectClose(void** pData=0, size_t* pSize=0);
519 
523  void ProjectSetXRefManager(const FbxXRefManager*);
524 
528  const FbxXRefManager* ProjectGetXRefManager() const;
529 
544  bool ProjectCreateEmbeddedFolder(const FbxXRefManager& pXRefManager, FbxString& pCreatedFolder, const char* pUserDefinedFolder = NULL);
545 
549  void SetEmbedded(bool pValue);
550 
554  void SetEmbeddingExtractionFolder(const char* pExtractionFolder);
555 
558  const char* GetEmbeddingExtractionFolder();
559 
563  bool IsEmbedded() const;
564 
568  bool IsBinary() const;
569 
573  bool IsEncrypted () const;
574 
578  bool CheckCRC();
579 
583  FbxUInt32 GetFileVersionNumber() const;
584 
588  void CacheSize(FbxUInt32 pCacheSize);
589 
593  FbxUInt32 CacheSize() const;
594 
596 
607 
609  bool Fbx7Support() const;
610 
614  void Fbx7Support(bool pSupport);
615 
617  bool CompressArrays() const;
618 
622  void CompressArrays(bool pCompress);
623 
625  int CompressMinimumSize() const;
626 
630  void CompressMinimumSize(int pSize);
631 
633  int CompressLevel() const;
634 
640  void CompressLevel(int pLevel);
642 
648 
652  bool ProjectOpenMainSection();
653 
657  int ProjectGetExtensionSectionCount() const;
658 
663  bool ProjectOpenExtensionSection(int pExtensionSectionIndex);
664 
669  bool ProjectCreateExtensionSection(bool pOverwriteLastExtensionSection = false);
670 
673  void ProjectCloseSection();
674 
678  int ProjectGetCurrentSection() const;
679 
683  int ProjectGetCurrentSectionMode() const;
684 
688  int ProjectGetCurrentSectionVersion() const;
689 
697  int ProjectGetSectionVersion(int pSection) const;
698 
705  static void ProjectConvertVersionNumber(int pVersion, int& pMajor, int& pMinor, int& pRevision);
706 
710  bool IsPasswordProtected() const;
711 
717  bool CheckPassword(const char* pPassword);
718 
725  bool WritePassword(const char* pPassword);
726 
728 
733 
737  const char* GetFilename() const;
738 
743  FbxString GetDataDirectory(bool pAutoCreate = true);
744 
753  FbxString GetMediaDirectory(bool pCreate = false, const char* pUserDefinedFolder = NULL);
754 
760  FbxString GetContainerTemplateDirectory(const char* pTemplateName, bool pCreate);
761 
766  char* GetRelativePath(const char* pPath);
767 
772  char* GetRelativeFilePath(const char* pFilePath);
773 
778  char* GetFullPath(const char* pRelativePath);
779 
784  char* GetFullFilePath(const char* pRelativeFilePath);
785 
790  char* GetTmpProjectName(const char* pName) const;
791 
798  bool SwapFromTmpProject(const char* pName, char* pError=NULL, int pErrorSize=0);
799 
801 
807 
810  void FieldReadResetPosition();
811 
815  int FieldGetCount() const;
816 
821  const char* FieldGetName(int pFieldIndex) const;
822 
827  int FieldGetInstanceCount(const char* pFieldName) const;
828 
834  bool FieldReadBegin(int pFieldIndex, int pInstance);
835 
840  bool FieldReadBegin(const char* pFieldName);
841 
847  bool FieldReadBegin(const char* pFieldName, int pInstance);
848 
850  void FieldReadEnd();
851 
853  bool FieldReadIsBlock();
854 
856  bool FieldReadBlockBegin();
857 
859  void FieldReadBlockEnd();
860 
862  int FieldReadGetCount() const;
863 
865  int FieldReadGetRemain() const;
866 
868  char FieldReadGetType() const;
869 
871  char FieldReadCH();
872 
877  char FieldReadCH(const char* pFieldName, char pDefault=0);
878 
880  const char* FieldReadC();
881 
886  const char* FieldReadC(const char* pFieldName, const char* pDefault="");
887 
889  const char* FieldReadS();
890 
895  const char* FieldReadS(const char* pFieldName, const char* pDefault="");
896 
898  bool FieldReadB();
899 
904  bool FieldReadB(const char* pFieldName, bool pDefault = false);
905 
907  int FieldReadI();
908 int FieldReadI(const char* pFieldName, int pDefault=0);
913 
915  FbxLongLong FieldReadLL();
916 
921  FbxLongLong FieldReadLL(const char* pFieldName, FbxLongLong pDefault=0);
922 
924  float FieldReadF();
925 
930  float FieldReadF(const char* pFieldName, float pDefault=0);
931 
933  double FieldReadD();
934 
939  double FieldReadD(const char* pFieldName, double pDefault=0);
940 
944  FbxTime FieldReadT(const char* pFieldName);
945 
947  FbxTime FieldReadT();
948 
952  FbxTimeSpan FieldReadTS(const char* pFieldName);
953 
955  FbxTimeSpan FieldReadTS();
956 
961  void FieldReadFn(float* pValue, FbxUInt pn);
962 
966  void FieldRead3F(float* pValue);
967 
971  void FieldRead4F(float* pValue);
972 
979  void FieldReadFn(const char* pFieldName, float* pValue, const float *pDefault, FbxUInt pn);
980 
986  void FieldRead3F(const char* pFieldName, float* pValue, const float* pDefault=NULL);
987 
993  void FieldRead4F(const char* pFieldName, float* pValue, const float* pDefault=NULL);
994 
999  void FieldReadDn(double* pValue, FbxUInt pn);
1000 
1004  void FieldRead3D(double* pValue);
1005 
1009  void FieldRead4D(double* pValue);
1010 
1017  void FieldReadDn(const char* pFieldName, double* pValue, const double *pDefault, FbxUInt pn);
1018 
1024  void FieldRead3D(const char* pFieldName, double* pValue, const double* pDefault=NULL);
1025 
1031  void FieldRead4D(const char* pFieldName, double* pValue, const double* pDefault=NULL);
1032 
1036  void* FieldReadR(int* pByteSize);
1037 
1042  void* FieldReadR(const char* pFieldName,int* pByteSize);
1043 
1048  FbxChar FieldReadByte();
1050 
1055  FbxChar FieldReadByte(const char* pFieldName, FbxChar pDefault=0);
1056 
1058  FbxUChar FieldReadUByte();
1059 
1064  FbxUChar FieldReadUByte(const char* pFieldName, FbxUChar pDefault=0);
1065 
1067  FbxShort FieldReadShort();
1068 
1073  FbxShort FieldReadShort(const char* pFieldName, FbxShort pDefault=0);
1074 
1076  FbxUShort FieldReadUShort();
1077 
1082  FbxUShort FieldReadUShort(const char* pFieldName, FbxUShort pDefault=0);
1083 
1085  unsigned int FieldReadUI();
1086 
1091  unsigned int FieldReadUI(const char* pFieldName, unsigned int pDefault=0);
1092 
1094  FbxULongLong FieldReadULL();
1095 
1100  FbxULongLong FieldReadULL(const char* pFieldName, FbxULongLong pDefault=0);
1101 
1105  const FbxChar* FieldReadArraySBytes( int &pCount );
1109  const FbxShort* FieldReadArrayShort ( int &pCount );
1113  const FbxUShort* FieldReadArrayUShort( int &pCount );
1117  const unsigned int* FieldReadArrayUI ( int &pCount );
1121  const FbxULongLong* FieldReadArrayULL ( int &pCount );
1122 
1126  const FbxChar* FieldReadArray(int &pCount, const FbxChar*);
1133  const FbxShort* FieldReadArray(int &pCount, const FbxShort*);
1137  const FbxUShort* FieldReadArray(int &pCount, const FbxUShort*);
1141  const unsigned int* FieldReadArray(int &pCount, const unsigned int*);
1145  const FbxULongLong* FieldReadArray(int &pCount, const FbxULongLong*);
1147 
1156  virtual bool FieldReadEmbeddedFile (FbxString& pFileName, FbxString& pRelativeFileName, const char* pEmbeddedMediaDirectory = "", bool *pIsFileCreated=NULL);
1157 
1161  const double* FieldReadArrayD( int &pCount );
1165  const float* FieldReadArrayF( int &pCount );
1169  const int* FieldReadArrayI( int &pCount );
1173  const FbxLongLong*FieldReadArrayLL(int &pCount );
1177  const bool* FieldReadArrayB( int &pCount );
1181  const FbxUChar* FieldReadArrayBytes( int &pCount );
1182 
1186  const int* FieldReadArray(int& pCount, const int*);
1190  const float* FieldReadArray(int& pCount, const float*);
1194  const double* FieldReadArray(int& pCount, const double*);
1198  const FbxLongLong* FieldReadArray(int& pCount, const FbxLongLong*);
1202  const bool* FieldReadArray(int& pCount, const bool*);
1206  const FbxUChar* FieldReadArray(int& pCount, const FbxUChar*);
1207 
1209 
1215 
1219  void FieldWriteBegin(const char* pFieldName);
1220 
1222  void FieldWriteEnd();
1223 
1225  void FieldWriteBlockBegin();
1226 
1232  void FieldWriteObjectBegin(const char* pObjectType, const char* pName, const char* pSubType=NULL);
1233 
1235  void FieldWriteObjectEnd();
1236 
1241  void FieldWriteBlockBegin(const char* pFileName);
1242 
1244  void FieldWriteBlockEnd ();
1245 
1249  void FieldWriteCH(char pValue);
1250 
1255  void FieldWriteCH(const char* pFieldName, char pValue);
1256 
1260  void FieldWriteC(const char* pValue);
1261 
1266  void FieldWriteC(const char* pFieldName, const char* pValue);
1267 
1271  void FieldWriteS(const char* pValue);
1272 
1276  void FieldWriteS(const FbxString& pValue);
1277 
1282  void FieldWriteS(const char* pFieldName, const char* pValue);
1283 
1288  void FieldWriteS(const char* pFieldName, const FbxString& pValue);
1289 
1293  void FieldWriteB(bool pValue);
1294 
1299  void FieldWriteB(const char* pFieldName, bool pValue);
1300 
1304  void FieldWriteI(int pValue);
1305 
1310  void FieldWriteI(const char* pFieldName, int pValue);
1311 
1315  void FieldWriteLL(FbxLongLong pValue);
1316 
1321  void FieldWriteLL(const char* pFieldName, FbxLongLong pValue);
1322 
1327  void FieldWriteF(float pValue);
1328 
1334  void FieldWriteF(const char* pFieldName, float pValue);
1335 
1339  void FieldWriteD(double pValue);
1340 
1345  void FieldWriteD(const char* pFieldName, double pValue);
1346 
1350  void FieldWriteT(FbxTime pTime);
1351 
1356  void FieldWriteT(const char* pFieldName,FbxTime pValue);
1357 
1361  void FieldWriteTS(FbxTimeSpan pTimeSpan);
1362 
1367  void FieldWriteTS(const char* pFieldName,FbxTimeSpan pValue);
1368 
1373  void FieldWriteFn(const float* pValue, FbxUInt pn);
1374 
1380  void FieldWriteFn(const char* pFieldName, const float* pValue, FbxUInt pn);
1381 
1385  void FieldWrite3F(const float* pValue);
1386 
1391  void FieldWrite3F(const char* pFieldName, const float* pValue);
1392 
1396  void FieldWrite4F(const float* pValue);
1397 
1402  void FieldWrite4F(const char* pFieldName, const float* pValue);
1403 
1408  void FieldWriteDn(const double* pValue, FbxUInt pn);
1409 
1415  void FieldWriteDn(const char* pFieldName, const double* pValue, FbxUInt pn);
1416 
1420  void FieldWrite3D(const double* pValue);
1421 
1426  void FieldWrite3D(const char* pFieldName, const double* pValue);
1427 
1431  void FieldWrite4D(const double* pValue);
1432 
1437  void FieldWrite4D(const char* pFieldName, const double* pValue);
1438 
1439  // The maximum number of value entries is, in theory, 2**32. In practice it should be a lot less than that.
1440  // pSize is the number of values to write from each pointer location, and stride is how much we
1441  // advance to get to the next value; if the stride is zero, values are tighly packed together.
1442  // So in total we'll write n * pSize items.
1443 
1450  void FieldWriteArrayD( int n, const double* pValue, int pSize = 1, int pStride = 0 );
1457  void FieldWriteArrayF( int n, const float* pValue, int pSize = 1, int pStride = 0 );
1464  void FieldWriteArrayI( int n, const int* pValue, int pSize = 1, int pStride = 0 );
1471  void FieldWriteArrayLL(int n, const FbxLongLong* pValue, int pSize = 1, int pStride = 0 );
1478  void FieldWriteArrayB( int n, const bool* pValue, int pSize = 1, int pStride = 0 );
1485  void FieldWriteArrayBytes( int n, const FbxUChar* pValue, int pSize = 1, int pStride = 0 );
1486 
1491  void FieldWriteR(const void* pRawData, int pByteSize);
1492 
1498  void FieldWriteR(const char* pFieldName, const void* pRawData, int pByteSize);
1499 
1504 
1508  void FieldWriteByte(FbxChar pValue);
1509 
1514  void FieldWriteByte(const char* pFieldName, FbxChar pValue);
1515 
1519  void FieldWriteUByte(FbxUChar pValue);
1520 
1525  void FieldWriteUByte(const char* pFieldName, FbxUChar pValue);
1526 
1530  void FieldWriteShort(FbxShort pValue);
1531 
1536  void FieldWriteShort(const char* pFieldName, FbxShort pValue);
1537 
1541  void FieldWriteUShort(FbxUShort pValue);
1542 
1547  void FieldWriteUShort(const char* pFieldName, FbxUShort pValue);
1548 
1552  void FieldWriteUI(unsigned int pValue);
1553 
1558  void FieldWriteUI(const char* pFieldName, unsigned int pValue);
1559 
1563  void FieldWriteULL(FbxULongLong pValue);
1564 
1570  void FieldWriteULL(const char* pFieldName, FbxULongLong pValue);
1571 
1578  void FieldWriteArraySBytes( int n, const FbxChar* pValue, int pSize = 1, int pStride = 0 );
1585  void FieldWriteArrayShort( int n, const FbxShort* pValue, int pSize = 1, int pStride = 0 );
1592  void FieldWriteArrayUShort( int n, const FbxUShort* pValue, int pSize = 1, int pStride = 0 );
1599  void FieldWriteArrayUI( int n, const unsigned int* pValue, int pSize = 1, int pStride = 0 );
1606  void FieldWriteArrayULL(int n, const FbxULongLong* pValue, int pSize = 1, int pStride = 0 );
1608 
1612  int GetFieldRMaxChunkSize() const;
1613 
1617  void FieldWriteObjectReference(const char* pName);
1618 
1623  void FieldWriteObjectReference(const char* pFieldName, const char* pName);
1624 
1631  bool FieldWriteEmbeddedFile (FbxString pFileName, FbxString pRelativeFileName);
1632 
1636  void WriteComments(const char* pFieldName);
1637 
1639 
1640 #ifdef _DEBUG
1641  // Dump function for debugging purpose only
1642  void StdoutDump();
1643 #endif
1644 
1652  bool GetHaveLoadedEmbededFile() const;
1653 
1658  void GetMemoryFileInfo(void** pMemPtr, size_t& pSize) const;
1659 
1663  bool IsBeforeVersion6() const;
1664 
1668  void SetIsBeforeVersion6(bool pIsBeforeVersion6);
1669 
1670 /*****************************************************************************************************************************
1671 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
1672 *****************************************************************************************************************************/
1673 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1674  bool ProjectOpen (FbxFile * pFile, FbxReader* pReader, bool pCheckCRC = false, bool pOpenMainSection = true, FbxIOFileHeaderInfo* pFileHeaderInfo = NULL);
1675 
1676 private:
1677  // to resolve warning C4512: 'class' : assignment operator could not be generated
1678  FbxIO& operator=(const FbxIO& pOther);
1679 
1680  FbxStatus& mStatus;
1681 
1682  struct InternalImpl;
1683  struct InternalImpl32;
1684  struct InternalImpl64;
1685  InternalImpl* mImpl;
1686 
1688 
1689  void ProjectClear();
1690  void ProjectReset();
1691 
1692  bool ProjectReadHeader(bool pCheckASCIIHeader, bool pCheckCRC, bool pOpenMainSection, FbxIOFileHeaderInfo* pFileHeaderInfo);
1693  bool ProjectReadExtendedHeader(FbxInt64& pExtendedHeaderEnd, FbxIOFileHeaderInfo* pFileHeaderInfo);
1694  bool BinaryReadHeader();
1695  bool BinaryReadSectionPosition();
1696  bool ASCIIReadHeader();
1697  bool ASCIIReadSectionPosition();
1698 
1699  bool ProjectWriteHeader(FbxIOFileHeaderInfo* pFileHeaderInfo);
1700  bool ProjectWriteExtendedHeader(FbxIOFileHeaderInfo* pFileHeaderInfo);
1701  void BinaryWriteHeader();
1702  void ASCIIWriteHeader();
1703 
1704  void ReadEncryptionKey(char* pEncryptionKey);
1705  void WriteEncryptionKey(char* pEncryptionKey);
1706 
1708 
1709  bool ProjectClearSection();
1710  bool ProjectOpenSection(int pSection);
1711  bool BinaryReadSectionHeader();
1712  FbxInt64 BinaryReadSectionFooter(char* pSourceCheck);
1713  bool BinaryReadExtensionCode(FbxInt64 pFollowingSectionStart, FbxInt64& pSectionStart, FbxUInt32& pSectionVersion);
1714  void BinaryReadSectionPassword();
1715 
1716  bool ProjectWriteSectionHeader();
1717  void BinaryWriteSectionFooter();
1718  bool BinaryWriteExtensionCode(FbxInt64 pSectionStart, FbxUInt32 pSectionVersion);
1719 
1720  FbxString GetCreationTime() const;
1721  void SetCreationTime(FbxString pCreationTime);
1722  void CreateSourceCheck(char* lSourceCheck);
1723  bool TestSourceCheck(char* pSourceCheck, char* pSourceCompany);
1724  FbxString GetMangledCreationTime();
1725  void EncryptSourceCheck(char* pSourceCheck, char* pEncryptionData);
1726  void DecryptSourceCheck(char* pSourceCheck, const char* pEncryptionData);
1727 
1728  void EncryptPasswordV1(FbxString pOriginalPassword, FbxString &pEncryptedPassword);
1729  void DecryptPasswordV1(FbxString pEncryptedPassword, FbxString &pDecryptedPassword);
1730 
1732 
1733  void CheckValidityOfFieldName(const char* pFieldName);
1734  void GetUnusedEmbeddedName(const FbxString& pDirectory, const FbxString& pName, FbxString& pResult, bool pCreateSubdirectory);
1735 
1737  FbxString GetDirectory(bool pAutoCreate, const char* pExtension);
1738 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
1739 };
1740 
1741 #include <fbxsdk/fbxsdk_nsend.h>
1742 
1743 #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:267
FbxAutoResetXRefManager(FbxIO *pFbx, FbxXRefManager &pXRefManager)
Default constructor.
Definition: fbxio.h:336
FBX SDK environment definition.
~FbxAutoResetXRefManager()
Destructor.
Definition: fbxio.h:348
FbxString mResolutionMode
resolution mode.
Definition: fbxio.h:196
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:278
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:264
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:198
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:188
FbxString mCreator
Indicates who is the creator of the file Ex: "FBX SDK/FBX Plugins version 2011.2".
Definition: fbxio.h:272
indicate not in a valid section
Definition: fbxio.h:180
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:367
const FbxXRefManager * ProjectGetXRefManager() const
Get the XRef Manager to use.
const FbxXRefManager * mXRefManager
Definition: fbxio.h:333
double mResolutionH
resolution height.
Definition: fbxio.h:200
indicate currently in the main section
Definition: fbxio.h:181
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:223
indicate currently in the extention section 0
Definition: fbxio.h:182
FbxIODefaultRenderResolution mDefaultRenderResolution
FbxIODefaultRenderResolution to handle default resolution values.
Definition: fbxio.h:252
FbxIO represents an FBX file.
Definition: fbxio.h:324
#define FBXSDK_DLL
Definition: fbxarch.h:173
FbxString mCameraName
camera name.
Definition: fbxio.h:194
int mFileVersion
Read only properties (not used for file write)
Definition: fbxio.h:261
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:357
bool mIsOK
If the resolution data is ready.
Definition: fbxio.h:192
bool mIOPlugin
Indicates whether the file is created by a genuine Autodesk plug-in or not.
Definition: fbxio.h:275
FbxInt64 FbxLongLong
Definition: fbxtypes.h:92
unsigned long FbxULong
Definition: fbxtypes.h:90