This reference page is linked to from the following overview topics: Customizing File Formats with FBX SDK I/O Plug-ins, Customizing the FBX SDK, List of Python Fbx classes, Customizing File Formats.
Base class of other readers used internally.
This class provides the interfaces for reading files.
The role of the reader is to effectively "read" specific file data vs the role of the importer is to select a specific reader and launch the reading of a file through that reader.
ex:
A SDK user should - normally - not use this class, except if a custom reader must be created for plug-in extension, then FbxReader must be the base class for the new custom reader in that particular situation.
MyOwnWriterReader/MyOwnReader.cxx, MyOwnWriterReader/MyOwnReader.h, MyOwnWriterReader/MyOwnWriterReader.cxx, and MyOwnWriterReader/MyOwnWriterReader.h.
Definition at line 62 of file fbxreader.h.
#include <fbxreader.h>

Public Types |
|
| enum | EErrorCode
{ eFileCorrupted, eFileVersionNotSupportedYet, eFileVersionNotSupportedAnymore, eFileNotOpened, eFileNotCreated, eWrongPassword, eInvalidDocumentHandle, eDocumentNotSupported, eUnresolvedExternalReferences, eUnknownError, eErrorCount } |
|
Error identifiers. More... |
|
| enum | EInfoRequest { eInfoExtension, eInfoDescriptions, eReserved1 = 0xFBFB } |
|
Information type to request. More... |
|
| enum | EFileOpenSpecialFlags { eParseForGlobalSettings = 1, eParseForStatistics = 2 } |
|
Flags for reading parts of file. More... |
|
| typedef FbxReader *(* | CreateFuncType )(FbxManager &pManager, FbxImporter &pImporter, int pSubID, int pPluginID) |
| typedef void(* | IOSettingsFillerFuncType )(FbxIOSettings &pIOS) |
| typedef void *(* | GetInfoFuncType )(EInfoRequest pRequest, int pReaderTypeId) |
Public Member Functions |
|
| FbxReader (FbxManager &pManager, int pID) | |
| Constructor. |
|
| virtual | ~FbxReader () |
| Destructor. |
|
| virtual void | GetVersion (int &pMajor, int &pMinor, int &pRevision) |
| Returns the file version. |
|
| virtual bool | FileOpen (char *pFileName)=0 |
| Opens the file with default flag. |
|
| virtual bool | FileOpen (FbxFile *pFile) |
| Opens the file with FbxFile handle. |
|
| virtual bool | FileOpen (FbxStream *pStream, void *pStreamData) |
| Opens the stream with default flag. |
|
| virtual bool | FileClose ()=0 |
| Closes the file stream. |
|
| virtual bool | IsFileOpen ()=0 |
| Checks if the file stream is open. |
|
| virtual bool | GetReadOptions (bool pParseFileAsNeeded=true)=0 |
| Returns file stream options. |
|
| virtual bool | Read (FbxDocument *pDocument)=0 |
| Reads file with stream options. |
|
| virtual void | PluginReadParameters (FbxObject &pParams) |
| Reads extension plug-ins name, version and
parameters, so that we can remember if a plug-in was used during
export. |
|
| virtual bool | FileOpen (char *pFileName, EFileOpenSpecialFlags) |
| Opens the file with specific
EFileOpenSpecialFlags. |
|
| virtual bool | GetAxisInfo (FbxAxisSystem *, FbxSystemUnit *) |
| Returns the system axis information and file
system units from the file. |
|
| virtual bool | GetStatistics (FbxStatistics *) |
| Returns statistics from the file. |
|
| virtual bool | GetFrameRate (FbxTime::EMode &pTimeMode) |
| Get FBX file time mode read from
GlobalSettings in FBX 6.n and FBX 7.n. |
|
| virtual FbxDocumentInfo * | GetSceneInfo () |
| Returns the scene info from the file.
|
|
| virtual FbxArray< FbxTakeInfo * > * | GetTakeInfo () |
| Returns the list of take infos from the
file. |
|
| virtual bool | GetDefaultRenderResolution (FbxString &pCamName, FbxString &pResolutionMode, double &pW, double &pH) |
| If default camera resolution is OK, returns
information about the resolution of the render. |
|
| bool | IsGenuine () |
| Judges if the format of the file is was
created by an Autodesk plug-in. |
|
| FbxError & | GetError () |
| Retrieves error objects. |
|
| EErrorCode | GetLastErrorID () const |
| Returns the ID of the last error that
occurred when the file was read. |
|
| const char * | GetLastErrorString () const |
| Returns the error string that describes the
last error that occurred when the file was read. |
|
| void | GetMessage (FbxString &pMessage) const |
| Returns a warning message that describes
what occurred when the file was read. |
|
| FbxString & | GetMessage () |
| Returns a warning message that describes
what occurred when the file was read. |
|
| void | ClearMessage () |
| Clears the warning message string. |
|
| virtual FbxIOSettings * | GetIOSettings () |
| Access to a IOSettings object. |
|
| virtual void | SetIOSettings (FbxIOSettings *pIOSettings) |
| Set the IOSettings pointer to be used for
this reader instance. |
|
| virtual void | SetProgressHandler (FbxProgress *) |
| Pass a progress handler to the reader.
|
|
| virtual void | SetEmbeddingExtractionFolder (const char *) |
| virtual bool | SupportsStreams () const |
| Returns true if this reader supports
FbxStream I/O.
|
|
Protected Member Functions |
|
| void | SetDefaultRenderResolution (const char *pCamName, const char *pResolutionMode, double pW, double pH) |
| Set resolution information for default
camera. |
|
| void | PluginsReadBegin (FbxScene &pScene) |
| A callback function called by FBX before the
FBX scene is read. |
|
| void | PluginsRead (const char *pName, const char *pVersion) |
| A callback function before read any FBX
object. |
|
| void | PluginsReadEnd (FbxScene &pScene) |
| A callback function called by FBX after read
the FBX scene. |
|
| FbxReader & | operator= (FbxReader const &) |
| virtual bool | CheckDuplicateNodeNames (FbxNode *pRootNode, FbxString &pDuplicateNodeNameList) |
| Check if there is any node under pRootNode
that have the same name in pDuplicateNodeNameList. |
|
Protected Attributes |
|
| FbxManager & | mManager |
| FBX SDK manager. |
|
| FbxIODefaultRenderResolution * | mData |
| Resolution data for the active camera.
|
|
Friends |
|
| struct | FbxReaderFbx7_Impl |
| typedef FbxReader*(* CreateFuncType)(FbxManager &pManager, FbxImporter &pImporter, int pSubID, int pPluginID) |
Helper typedef for passing FbxReader creator function as argument (used internally)
Definition at line 111 of file fbxreader.h.
| typedef void(* IOSettingsFillerFuncType)(FbxIOSettings &pIOS) |
Helper typedef for passing FbxIOSettings creator function as argument (used internally)
Definition at line 114 of file fbxreader.h.
| typedef void*(* GetInfoFuncType)(EInfoRequest pRequest, int pReaderTypeId) |
Helper typedef for passing EInfoRequest function as argument (used internally)
Definition at line 117 of file fbxreader.h.
| enum EErrorCode |
Error identifiers.
Definition at line 76 of file fbxreader.h.
| enum EInfoRequest |
Information type to request.
| eInfoExtension |
To get the file ext for a reader ex: "FBX". |
| eInfoDescriptions |
To get the file description for a reader ex: "Autodesk FBX (*.fbx)". |
| eReserved1 |
Definition at line 94 of file fbxreader.h.
{
eInfoExtension,
eInfoDescriptions,
eReserved1 = 0xFBFB,
};
Flags for reading parts of file.
| eParseForGlobalSettings |
Used for reading the Global settings section when an importer is initialized. |
| eParseForStatistics |
Used for reading a group of statistics when an importer is initialized. |
Definition at line 104 of file fbxreader.h.
{
eParseForGlobalSettings = 1,
eParseForStatistics = 2
};
| FbxReader | ( | FbxManager & | pManager, |
| int | pID | ||
| ) |
Constructor.
| pManager | The FbxManager Object. |
| pID | Id for current reader. |
| virtual ~FbxReader | ( | ) | [virtual] |
Destructor.
| virtual void GetVersion | ( | int & | pMajor, |
| int & | pMinor, | ||
| int & | pRevision | ||
| ) | [inline, virtual] |
Returns the file version.
| pMajor | Major version. |
| pMinor | Minor version. |
| pRevision | Revision version. |
Reimplemented in FbxReaderFbx5, FbxReaderFbx6, and FbxReaderFbx7.
Definition at line 124 of file fbxreader.h.
{ pMajor = pMinor = pRevision = 0; }
| virtual bool FileOpen | ( | char * | pFileName | ) | [pure virtual] |
Opens the file with default flag.
| pFileName | Name of the File to open |
true,
otherwise return false.Implemented in FbxReaderCollada, FbxReaderFbx5, FbxReaderFbx6, and FbxReaderFbx7.
| virtual bool FileOpen | ( | FbxFile * | pFile | ) | [virtual] |
Opens the file with FbxFile handle.
| pFile | The FbxFile handle |
true,
otherwise return false.Reimplemented in FbxReaderFbx5, FbxReaderFbx6, and FbxReaderFbx7.
| virtual bool FileOpen | ( | FbxStream * | pStream, |
| void * | pStreamData | ||
| ) | [virtual] |
Opens the stream with default flag.
| pStream | stream to open |
| pStreamData | user-defined stream data |
true,
otherwise return false.Reimplemented in FbxReaderFbx5, FbxReaderFbx6, and FbxReaderFbx7.
| virtual bool FileClose | ( | ) | [pure virtual] |
Closes the file stream.
falseImplemented in FbxReaderCollada, FbxReaderFbx5, FbxReaderFbx6, and FbxReaderFbx7.
| virtual bool IsFileOpen | ( | ) | [pure virtual] |
Checks if the file stream is open.
false.Implemented in FbxReaderCollada, FbxReaderFbx5, FbxReaderFbx6, and FbxReaderFbx7.
| virtual bool GetReadOptions | ( | bool | pParseFileAsNeeded =
true |
) | [pure virtual] |
Returns file stream options.
| pParseFileAsNeeded | Sets whether to parse file as read options |
Implemented in FbxReaderCollada, FbxReaderFbx5, FbxReaderFbx6, and FbxReaderFbx7.
| virtual bool Read | ( | FbxDocument * | pDocument | ) | [pure virtual] |
Reads file with stream options.
| pDocument | FbxDocument to store the file data |
false.Implemented in FbxReaderCollada, FbxReaderFbx5, FbxReaderFbx6, and FbxReaderFbx7.
| virtual void PluginReadParameters | ( | FbxObject & | pParams | ) | [virtual] |
Reads extension plug-ins name, version and parameters, so that we can remember if a plug-in was used during export.
This is especially useful for extension plug-ins that modify the scene and also to warn users during import if an extension plug-in was used that could be missing.
| pParams | The parameters of the extension plug-in. The properties of the objects are used as the parameters of the extension plug-in. |
Reimplemented in FbxReaderFbx6, and FbxReaderFbx7.
| virtual bool FileOpen | ( | char * | pFileName, |
| EFileOpenSpecialFlags | |||
| ) | [inline, virtual] |
Opens the file with specific EFileOpenSpecialFlags.
| pFileName | Name of the File to open. |
| pFlags | The EFileOpenSpecialFlags to open with |
Reimplemented in FbxReaderFbx6, and FbxReaderFbx7.
Definition at line 184 of file fbxreader.h.
{ return FileOpen(pFileName); }
| virtual bool GetAxisInfo | ( | FbxAxisSystem * | , |
| FbxSystemUnit * | |||
| ) | [inline, virtual] |
Returns the system axis information and file system units from the file.
| pAxisSystem | Axis system in file |
| pSystemUnits | System unit in file |
false.Reimplemented in FbxReaderCollada, FbxReaderFbx6, and FbxReaderFbx7.
Definition at line 191 of file fbxreader.h.
{ return false; }
| virtual bool GetStatistics | ( | FbxStatistics * | ) | [inline, virtual] |
Returns statistics from the file.
| pStats | Statistics in the file. |
false.Reimplemented in FbxReaderFbx6, and FbxReaderFbx7.
Definition at line 197 of file fbxreader.h.
{ return false; }
| virtual bool GetFrameRate | ( | FbxTime::EMode & | pTimeMode | ) | [inline, virtual] |
Get FBX file time mode read from GlobalSettings in FBX 6.n and FBX 7.n.
| pTimeMode | ref to a FbxTime::EMode enum |
true on success, false
otherwise.Reimplemented in FbxReaderFbx6, and FbxReaderFbx7.
Definition at line 205 of file fbxreader.h.
{ pTimeMode = FbxTime::eDefaultMode; return false; }
| virtual FbxDocumentInfo* GetSceneInfo | ( | ) | [inline, virtual] |
Returns the scene info from the file.
Reimplemented in FbxReaderFbx5, FbxReaderFbx6, and FbxReaderFbx7.
Definition at line 211 of file fbxreader.h.
{return NULL;}
| virtual FbxArray<FbxTakeInfo*>* GetTakeInfo | ( | ) | [inline, virtual] |
Returns the list of take infos from the file.
Reimplemented in FbxReaderCollada, FbxReaderFbx5, FbxReaderFbx6, and FbxReaderFbx7.
Definition at line 216 of file fbxreader.h.
{return NULL;}
| virtual bool GetDefaultRenderResolution | ( | FbxString & | pCamName, |
| FbxString & | pResolutionMode, | ||
| double & | pW, | ||
| double & | pH | ||
| ) | [virtual] |
If default camera resolution is OK, returns information about the resolution of the render.
| pCamName | Default camera name. |
| pResolutionMode | Default resolution mode. |
| pW | Default resolution width. |
| pH | Default resolution height. |
true If default camera resolution is OK,
false Otherwise.| bool IsGenuine | ( | ) |
Judges if the format of the file is was created by an Autodesk plug-in.
An internal (genuine) plug-in is one created by the Autodesk FBX product team.
true If the file format is internal plug-in ,
false Otherwise.| FbxError& GetError | ( | ) |
| EErrorCode GetLastErrorID | ( | ) | const |
Returns the ID of the last error that occurred when the file was read.
| const char* GetLastErrorString | ( | ) | const |
Returns the error string that describes the last error that occurred when the file was read.
| void GetMessage | ( | FbxString & | pMessage | ) | const |
Returns a warning message that describes what occurred when the file was read.
| pMessage | The returned warning message. |
| FbxString& GetMessage | ( | ) |
Returns a warning message that describes what occurred when the file was read.
| void ClearMessage | ( | ) |
Clears the warning message string.
| virtual FbxIOSettings* GetIOSettings | ( | ) | [virtual] |
Access to a IOSettings object.
| virtual void SetIOSettings | ( | FbxIOSettings * | pIOSettings | ) | [virtual] |
Set the IOSettings pointer to be used for this reader instance.
| pIOSettings |
| virtual void SetProgressHandler | ( | FbxProgress * | ) | [inline, virtual] |
Pass a progress handler to the reader.
| pProgress | FbxProgress to store the progress information. |
Reimplemented in FbxReaderFbx6, and FbxReaderFbx7.
Definition at line 275 of file fbxreader.h.
{}
| virtual void SetEmbeddingExtractionFolder | ( | const char * | ) | [inline, virtual] |
Reimplemented in FbxReaderFbx5, FbxReaderFbx6, and FbxReaderFbx7.
Definition at line 277 of file fbxreader.h.
{}
| virtual bool SupportsStreams | ( | ) | const [virtual] |
Returns true if this reader supports FbxStream I/O.
Default value is false.
Reimplemented in FbxReaderFbx5, FbxReaderFbx6, and FbxReaderFbx7.
| void SetDefaultRenderResolution | ( | const char * | pCamName, |
| const char * | pResolutionMode, | ||
| double | pW, | ||
| double | pH | ||
| ) | [protected] |
Set resolution information for default camera.
| pCamName | The default camera name. |
| pResolutionMode | Resolution mode. ex: "Fixed Resolution","Fixed Ratio","Fixed Width","Fixed Height","Window Size". |
| pW | Resolution width. |
| pH | Resolution height. |
| void PluginsReadBegin | ( | FbxScene & | pScene | ) | [protected] |
A callback function called by FBX before the FBX scene is read.
| void PluginsRead | ( | const char * | pName, |
| const char * | pVersion | ||
| ) | [protected] |
A callback function before read any FBX object.
| pName | Object name. |
| pVersion | Version of object. |
| void PluginsReadEnd | ( | FbxScene & | pScene | ) | [protected] |
A callback function called by FBX after read the FBX scene.
Definition at line 303 of file fbxreader.h.
{ return *this; }
| virtual bool CheckDuplicateNodeNames | ( | FbxNode * | pRootNode, |
| FbxString & | pDuplicateNodeNameList | ||
| ) | [protected, virtual] |
Check if there is any node under pRootNode that have the same name in pDuplicateNodeNameList.
| pRootNode | Root node. The node and its children will be checked recursively. |
| pDuplicatedNodeNameList | Name list. |
friend struct FbxReaderFbx7_Impl
[friend] |
Definition at line 322 of file fbxreader.h.
FbxManager& mManager
[protected] |
FBX SDK manager.
Definition at line 312 of file fbxreader.h.
FbxIODefaultRenderResolution*
mData
[protected] |
Resolution data for the active camera.
Definition at line 314 of file fbxreader.h.