FBX C++ API Reference
fbxwriterfbx7.h
Go to the documentation of this file.
1 /****************************************************************************************
2 
3  Copyright (C) 2019 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_WRITER_FBX7_H_
14 #define _FBXSDK_FILEIO_FBX_WRITER_FBX7_H_
15 
16 #include <fbxsdk.h>
17 
18 #include <fbxsdk/fbxsdk_nsbegin.h>
19 
20 struct FbxWriterFbx7_Impl;
21 
22 class FbxWriterFbx7 : public FbxWriter
23 {
24 public:
25  typedef enum
26  {
30  } EExportMode;
31 
32  FbxWriterFbx7(FbxManager& pManager, FbxExporter& pExporter, int pID, FbxStatus& pStatus);
33  FbxWriterFbx7(FbxManager& pManager, FbxExporter& pExporter, EExportMode pMode, int pID, FbxStatus& pStatus);
34  virtual ~FbxWriterFbx7();
35 
36  bool FileCreate(char* pFileName) override;
37  bool FileCreate(FbxStream* pStream, void* pStreamData) override;
38  bool FileClose() override;
39  bool IsFileOpen() override;
40 
41  void GetWriteOptions() override;
42  bool Write(FbxDocument* pDocument) override;
43  bool PreprocessScene(FbxScene &pScene) override;
44  bool PostprocessScene(FbxScene &pScene) override;
45  virtual bool Write(FbxDocument* pDocument, FbxIO* pFbx);
46 #ifndef FBXSDK_ENV_WINSTORE
47  void PluginWriteParameters(FbxObject& pParams) override;
48 #endif // FBXSDK_ENV_WINSTORE
49  void SetProgressHandler(FbxProgress *pProgress) override;
50  void SetEmbeddedFileCallback(FbxEmbeddedFileCallback* pCallback) override;
51  void SetExportMode(EExportMode pMode);
52 
53  bool SupportsStreams() const override { return true; }
54 
55 private:
56  // Declared, not defined.
58  FbxWriterFbx7& operator=(const FbxWriterFbx7&);
59 
60  struct ModifiedPropertyInfo{ FbxObject* mObj; FbxString mPropName; };
61  FbxArray<ModifiedPropertyInfo*> mModifiedProperties;
62  void StoreUnsupportedProperty(FbxObject* pObject, FbxProperty& pProperty);
63 
64  void MakeNonSavableAndRemember(FbxObject* pObj);
65  FbxArray<FbxObject*> mSwitchedToNonSavablesObjects;
66  FbxArray<FbxAnimLayer*> mAnimLayerInternallyAdded;
67 
68 private:
69  FbxWriterFbx7_Impl* mImpl;
70 };
71 
72 #include <fbxsdk/fbxsdk_nsend.h>
73 
74 #endif /* _FBXSDK_FILEIO_FBX_WRITER_FBX7_H_ */
bool FileClose() override
Closes the file.
Callback to operate on the embedded data while it is processed.
Definition: fbxcallbacks.h:166
SDK object manager.
Definition: fbxmanager.h:56
void PluginWriteParameters(FbxObject &pParams) override
Writes extension plug-ins name, version and parameters, so that we can remember if a plug-in was used...
Abstract class for implementing I/O operations through a stream of data.
Definition: fbxstream.h:26
Utility class to manipulate strings.
Definition: fbxstring.h:66
FbxDocument is a base class for FbxScene and FbxLibrary classes.
Definition: fbxdocument.h:46
void GetWriteOptions() override
Setup write options.
FbxWriterFbx7(FbxManager &pManager, FbxExporter &pExporter, int pID, FbxStatus &pStatus)
This class facilitates the testing/reporting of errors.
Definition: fbxstatus.h:29
bool IsFileOpen() override
Test if the file is open.
bool PostprocessScene(FbxScene &pScene) override
Post-processes the scene.
virtual ~FbxWriterFbx7()
The base class of most FBX objects.
Definition: fbxobject.h:157
Class to export SDK objects into an FBX file.
Definition: fbxexporter.h:90
void SetEmbeddedFileCallback(FbxEmbeddedFileCallback *pCallback) override
This class contains the description of a 3D scene.
Definition: fbxscene.h:61
Base class of other writers used internally.
Definition: fbxwriter.h:59
bool Write(FbxDocument *pDocument) override
Writes content to the specified file with given stream options.
Class for progress reporting.
Definition: fbxprogress.h:31
Class to hold user properties.
Definition: fbxproperty.h:39
FbxIO represents an FBX file.
Definition: fbxio.h:347
bool FileCreate(char *pFileName) override
Creates a new file.
bool SupportsStreams() const override
Returns true if this writer supports FbxStream I/O.
Definition: fbxwriterfbx7.h:53
void SetProgressHandler(FbxProgress *pProgress) override
Pass a progress handler to the writer.
bool PreprocessScene(FbxScene &pScene) override
Pre-processes the scene.
void SetExportMode(EExportMode pMode)