FBX C++ API Reference
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FbxIOPluginRegistry Class Reference

#include <fbxiopluginregistry.h>

Class Description

This class serves as the registrar for file formats.

A file format must be registered when it is used by the FBX SDK.

This class also lets you create and read formats other than FBX SDK native formats. Users of FBX SDK can write their own plug-ins to read or write arbitrary file formats. Once their plug-ins are registered in this class, FBX SDK is able to read or write these file formats.

Each FbxManager has a unique FbxIOPluginRegistry. To get an instance of this class:

FbxIOPluginRegistry* registry = manager->GetIOPluginRegistry();
See also
FbxManager::GetIOPluginRegistry()

Definition at line 37 of file fbxiopluginregistry.h.

Public Member Functions

 FbxIOPluginRegistry ()
 Constructor. More...
 
virtual ~FbxIOPluginRegistry ()
 Destructor. More...
 
void RegisterReader (const char *pPluginPath, int &pFirstPluginID, int &pRegisteredCount, bool pOverride=false)
 Registers a Reader from a plug-in path. More...
 
void RegisterReader (FbxReader::CreateFuncType pCreateF, FbxReader::GetInfoFuncType pInfoF, int &pFirstPluginID, int &pRegisteredCount, FbxReader::IOSettingsFillerFuncType pIOSettingsFillerF=((void *) 0), bool pOverride=false)
 Registers a Reader. More...
 
void RegisterWriter (const char *pPluginPath, int &pFirstPluginID, int &pRegisteredCount, bool pOverride=false)
 Registers a Writer from a plug-in path. More...
 
void RegisterWriter (FbxWriter::CreateFuncType pCreateF, FbxWriter::GetInfoFuncType pInfoF, int &pFirstPluginID, int &pRegisteredCount, FbxWriter::IOSettingsFillerFuncType pIOSettingsFillerF=((void *) 0), bool pOverride=false)
 Registers a Writer. More...
 
FbxReaderCreateReader (FbxManager &pManager, FbxImporter &pImporter, int pPluginID) const
 Creates a Reader. More...
 
FbxWriterCreateWriter (FbxManager &pManager, FbxExporter &pExporter, int pPluginID) const
 Creates a Writer. More...
 
int FindReaderIDByExtension (const char *pExt) const
 Searches for the Reader ID by the file extension. More...
 
int FindWriterIDByExtension (const char *pExt) const
 Searches for the Writer ID by the file extension. More...
 
int FindReaderIDByDescription (const char *pDesc) const
 Searches for the Reader ID by the file format description. More...
 
int FindWriterIDByDescription (const char *pDesc) const
 Searches for the Writer ID by the file format description. More...
 
bool ReaderIsFBX (int pFileFormat) const
 Verifies if the file format of the Reader is FBX. More...
 
bool WriterIsFBX (int pFileFormat) const
 Verifies if the file format of the Writer is FBX. More...
 
bool ReaderIsGenuine (int pFileFormat) const
 Verifies if the file format of the Reader is genuine (internal). More...
 
bool WriterIsGenuine (int pFileFormat) const
 Verifies if the file format of the Writer is genuine (internal). More...
 
int GetReaderFormatCount () const
 Returns the number of file formats that can be imported. More...
 
int GetWriterFormatCount () const
 Returns the number of file formats that can be exported. More...
 
const char * GetReaderFormatDescription (int pFileFormat) const
 Returns the description of an importable file format. More...
 
const char * GetWriterFormatDescription (int pFileFormat) const
 Returns the description of an exportable file format. More...
 
const char * GetReaderFormatExtension (int pFileFormat) const
 Returns an importable file format's file extension. More...
 
const char * GetWriterFormatExtension (int pFileFormat) const
 Returns an exportable file format's file extension. More...
 
char const *const * GetWritableVersions (int pFileFormat) const
 Returns a list of the writable file format versions. More...
 
bool DetectReaderFileFormat (const char *pFileName, int &pFileFormat) const
 Detects the import (reader) file format specified for the file. More...
 
bool DetectWriterFileFormat (const char *pFileName, int &pFileFormat) const
 Detects the export (writer) file format specified for the file. More...
 
int GetNativeReaderFormat ()
 Returns the file format of the native Reader. More...
 
int GetNativeWriterFormat ()
 Returns the file format of the native Writer. More...
 
void FillIOSettingsForReadersRegistered (FbxIOSettings &pIOS)
 Fills the IO Settings for all registered readers. More...
 
void FillIOSettingsForWritersRegistered (FbxIOSettings &pIOS)
 Fills the IO Settings for all registered writers. More...
 

Constructor & Destructor Documentation

◆ FbxIOPluginRegistry()

Constructor.

◆ ~FbxIOPluginRegistry()

virtual ~FbxIOPluginRegistry ( )
virtual

Destructor.

Member Function Documentation

◆ RegisterReader() [1/2]

void RegisterReader ( const char *  pPluginPath,
int &  pFirstPluginID,
int &  pRegisteredCount,
bool  pOverride = false 
)

Registers a Reader from a plug-in path.

Parameters
pPluginPathThe plug-in path.
pFirstPluginIDContains the ID of the first plug-in found.
pRegisteredCountContains the number of registered Readers.
pOverrideOverride any existing writer that is using the same extension.
Examples:
ExportScene05/main.cxx.

◆ RegisterReader() [2/2]

void RegisterReader ( FbxReader::CreateFuncType  pCreateF,
FbxReader::GetInfoFuncType  pInfoF,
int &  pFirstPluginID,
int &  pRegisteredCount,
FbxReader::IOSettingsFillerFuncType  pIOSettingsFillerF = ((void *) 0),
bool  pOverride = false 
)

Registers a Reader.

Parameters
pCreateFThe function that creates the Reader to be registered.
pInfoFThe function that provides information about the Reader file format, such as the file extension and description.
pFirstPluginIDContains the ID of the first plug-in found.
pRegisteredCountContains the number of registered Readers.
pIOSettingsFillerFThe function that fills the IO settings for the Reader.
pOverrideOverride any existing writer that is using the same extension.

◆ RegisterWriter() [1/2]

void RegisterWriter ( const char *  pPluginPath,
int &  pFirstPluginID,
int &  pRegisteredCount,
bool  pOverride = false 
)

Registers a Writer from a plug-in path.

Parameters
pPluginPathThe plug-in path.
pFirstPluginIDContains the ID of the first plug-in found.
pRegisteredCountContains the number of registered Writers.
pOverrideOverride any existing writer that is using the same extension.
Examples:
ExportScene05/main.cxx.

◆ RegisterWriter() [2/2]

void RegisterWriter ( FbxWriter::CreateFuncType  pCreateF,
FbxWriter::GetInfoFuncType  pInfoF,
int &  pFirstPluginID,
int &  pRegisteredCount,
FbxWriter::IOSettingsFillerFuncType  pIOSettingsFillerF = ((void *) 0),
bool  pOverride = false 
)

Registers a Writer.

Parameters
pCreateFThe function that creates the Writer to be registered.
pInfoFThe function that provides information about the Writer file format, such as the file extension, description and version.
pFirstPluginIDContains the ID of the first plug-in found.
pRegisteredCountContains the number of registered Writers.
pIOSettingsFillerFThe function that fills the IO settings for the Writer.
pOverrideOverride any existing writer that is using the same extension.

◆ CreateReader()

FbxReader* CreateReader ( FbxManager pManager,
FbxImporter pImporter,
int  pPluginID 
) const

Creates a Reader.

Parameters
pManagerThe SDK Manager where the Reader is created.
pImporterThe importer that holds the created Reader.
pPluginIDThe Reader ID.

◆ CreateWriter()

FbxWriter* CreateWriter ( FbxManager pManager,
FbxExporter pExporter,
int  pPluginID 
) const

Creates a Writer.

Parameters
pManagerThe SDK Manager where the Writer is created.
pExporterThe exporter that holds the created Writer.
pPluginIDThe Writer ID.

◆ FindReaderIDByExtension()

int FindReaderIDByExtension ( const char *  pExt) const

Searches for the Reader ID by the file extension.

Parameters
pExtThe file extension.
Returns
The Reader ID if found, if not found, returns -1

◆ FindWriterIDByExtension()

int FindWriterIDByExtension ( const char *  pExt) const

Searches for the Writer ID by the file extension.

Parameters
pExtThe file extension.
Returns
The Writer ID if found, if not found, returns -1
Examples:
ExportScene05/main.cxx.

◆ FindReaderIDByDescription()

int FindReaderIDByDescription ( const char *  pDesc) const

Searches for the Reader ID by the file format description.

Parameters
pDescThe file format description.
Returns
The Reader ID if found, if not found, returns -1
Examples:
FileStream/main.cxx.

◆ FindWriterIDByDescription()

int FindWriterIDByDescription ( const char *  pDesc) const

Searches for the Writer ID by the file format description.

Parameters
pDescThe file format description.
Returns
The Writer ID if found, if not found, returns -1.
Examples:
ConvertScene/main.cxx, FileStream/main.cxx, and UserProperties/main.cxx.

◆ ReaderIsFBX()

bool ReaderIsFBX ( int  pFileFormat) const

Verifies if the file format of the Reader is FBX.

Parameters
pFileFormatThe file format identifier.
Returns
True if the file format of the Reader is FBX, return false otherwise..

◆ WriterIsFBX()

bool WriterIsFBX ( int  pFileFormat) const

Verifies if the file format of the Writer is FBX.

Parameters
pFileFormatThe file format identifier.
Returns
True if the file format of the Writer is FBX, return false otherwise.
Examples:
Common/Common.cxx, and ExportDocument/main.cxx.

◆ ReaderIsGenuine()

bool ReaderIsGenuine ( int  pFileFormat) const

Verifies if the file format of the Reader is genuine (internal).

Parameters
pFileFormatThe file format identifier.
Returns
True if the file format of the Reader is FBX, DXF, 3DS, OBJ and DAE, return false otherwise.

◆ WriterIsGenuine()

bool WriterIsGenuine ( int  pFileFormat) const

Verifies if the file format of the Writer is genuine (internal).

Parameters
pFileFormatThe file format identifier.
Returns
True if the file format of the Writer is FBX, DXF, 3DS, OBJ and DAE, return false otherwise.

◆ GetReaderFormatCount()

int GetReaderFormatCount ( ) const

Returns the number of file formats that can be imported.

Returns
The number of importable formats.

◆ GetWriterFormatCount()

int GetWriterFormatCount ( ) const

Returns the number of file formats that can be exported.

Returns
The number of exportable formats.
Remarks
Multiple identifiers for the same format count as different file formats. For example, eFBX_BINARY, eFBX_ASCII and eFBX_ENCRYPTED are counted as three separate file formats.
Examples:
Common/Common.cxx, and ExportDocument/main.cxx.

◆ GetReaderFormatDescription()

const char* GetReaderFormatDescription ( int  pFileFormat) const

Returns the description of an importable file format.

Parameters
pFileFormatThe file format identifier.
Returns
A pointer to the character representation of the description.

◆ GetWriterFormatDescription()

const char* GetWriterFormatDescription ( int  pFileFormat) const

Returns the description of an exportable file format.

Parameters
pFileFormatThe file format identifier.
Returns
A pointer to the character representation of the description.
Examples:
Common/Common.cxx, and ExportDocument/main.cxx.

◆ GetReaderFormatExtension()

const char* GetReaderFormatExtension ( int  pFileFormat) const

Returns an importable file format's file extension.

Parameters
pFileFormatThe file format identifier.
Returns
A pointer to the character representation of the file extension.

◆ GetWriterFormatExtension()

const char* GetWriterFormatExtension ( int  pFileFormat) const

Returns an exportable file format's file extension.

Parameters
pFileFormatThe file format identifier.
Returns
A pointer to the character representation of the file extension.

◆ GetWritableVersions()

char const* const* GetWritableVersions ( int  pFileFormat) const

Returns a list of the writable file format versions.

Parameters
pFileFormatThe file format identifier.
Returns
A pointer to a list of user-readable strings that represent the versions.

◆ DetectReaderFileFormat()

bool DetectReaderFileFormat ( const char *  pFileName,
int &  pFileFormat 
) const

Detects the import (reader) file format specified for the file.

Parameters
pFileNameThe file whose file format is to be determined.
pFileFormatIt equals the file format identifier if this function returns true. If this function returns false, it is unmodified.
Returns
True if the file has been determined successfully, returns false otherwise.
Remarks
This function attempts to detect the specified file's file format based on the file extension and, in some cases, its content. This function may not be able to determine all file formats. Use this function as a helper before calling SetFileFormat().
Note
The file must be unlocked (already open) for this function to succeed.

◆ DetectWriterFileFormat()

bool DetectWriterFileFormat ( const char *  pFileName,
int &  pFileFormat 
) const

Detects the export (writer) file format specified for the file.

Parameters
pFileNameThe file whose file format is to be determined.
pFileFormatIt equals the file format identifier if this function returns true. If this function returns false, it is unmodified.
Returns
True if the file has been determined successfully, returns false otherwise.
Remarks
This function attempts to detect the specified file's file format based on the file extension and, in some cases, its content. This function may not be able to determine all file formats. Use this function as a helper before calling SetFileFormat().
Note
The file must be unlocked (already open) for this function to succeed.

◆ GetNativeReaderFormat()

int GetNativeReaderFormat ( )

Returns the file format of the native Reader.

Returns
The ID of the native Reader's file format.

◆ GetNativeWriterFormat()

int GetNativeWriterFormat ( )

Returns the file format of the native Writer.

Returns
The ID of the native Writer's file format.
Examples:
Common/Common.cxx, and ExportDocument/main.cxx.

◆ FillIOSettingsForReadersRegistered()

void FillIOSettingsForReadersRegistered ( FbxIOSettings pIOS)

Fills the IO Settings for all registered readers.

Parameters
pIOSThe IO settings to be filled.

◆ FillIOSettingsForWritersRegistered()

void FillIOSettingsForWritersRegistered ( FbxIOSettings pIOS)

Fills the IO Settings for all registered writers.

Parameters
pIOSThe IO settings to be filled.

The documentation for this class was generated from the following file: