KFbxSdkManager
#include<kfbxsdkmanager.h>

List of all members.

Detailed Description

SDK object manager.

The SDK manager is in charge of:

Upon destruction, all objects allocated by the SDK manager and not explicitly destroyed are destroyed as well. A derived class can be defined to allocate and deallocate a set of specialized scene elements.

Definition at line79of filekfbxsdkmanager.h.


Error Management

enum EError{
  eOBJECT_NOT_FOUND,
  eNAME_ALREADY_IN_USE,
  eERROR_COUNT
}
 Error codes.More...
KErrorGetError()
 Retrieve error object.
EError GetLastErrorID() const
 Get last error code.
const char * GetLastErrorString() const
 Get last error string.

Global Object Management

KArrayTemplate<KFbxObject*> mObjectArray
staticKString PrefixName(char const *pPrefix, char const *pName)
 Add a prefix to a name.
void RegisterObject(KFbxPlugconst *pPlug)
 Register object.
void UnregisterObject(KFbxPlugconst *pPlug)
 Unregister object.
int GetSrcObjectCount(KFbxImageConverterconst *)
 Get the count ofKFbxImageConverter.
KFbxImageConverterGetSrcObject(KFbxImageConverterconst *, int pIndex=0)
 Get the (pIndex)thKFbxImageConverter.
int GetSrcObjectCount(KFbxNodeconst *)
 Get the count ofKFbxNode.
KFbxNodeGetSrcObject(KFbxNodeconst *, int pIndex=0)
 Get the (pIndex)thKFbxNode.
int GetSrcObjectCount(KFbxTextureconst *)
 Get the count ofKFbxTexture.
KFbxTextureGetSrcObject(KFbxTextureconst *, int pIndex=0)
 Get the (pIndex)thKFbxTexture.
int GetSrcObjectCount(KFbxClusterconst *)
 Get the count ofKFbxCluster.
KFbxClusterGetSrcObject(KFbxClusterconst *, int pIndex=0)
 Get the (pIndex)thKFbxCluster.
int GetSrcObjectCount(KFbxSceneconst *)
 Get the count ofKFbxScene.
KFbxSceneGetSrcObject(KFbxSceneconst *, int pIndex=0)
 Get the (pIndex)thKFbxScene.
int GetSrcObjectCount(KFbxDocumentconst *)
 Get the count ofKFbxDocument.
KFbxDocumentGetSrcObject(KFbxDocumentconst *, int pIndex=0)
 Get the (pIndex)thKFbxDocument.
int GetSrcObjectCount(KFbxSurfaceMaterialconst *)
 Get the count ofKFbxSurfaceMaterial.
KFbxSurfaceMaterialGetSrcObject(KFbxSurfaceMaterialconst *, int pIndex=0)
 Get the (pIndex)thKFbxSurfaceMaterial.

Memory Management

static bool SetMemoryAllocator(KFbxMemoryAllocator*pMemoryAllocator)
 SDK Memory management.

FBX SDK Manager Creation/Destruction

staticKFbxSdkManagerCreate()
 SDK manager allocation method.
virtual void Destroy()
 Destructor.

Plug and Object Definition and Management

template<typename T1, typename T2>
kFbxClassId RegisterFbxClass(char const *pName, T1 const *pFBX_TYPE_Class, T2 const *pFBX_TYPE_ParentClass, const char *pFbxFileTypeName=0, const char *pFbxFileSubTypeName=0)
 Class registration.
template<typename T>
kFbxClassId RegisterRuntimeFbxClass(char const *pName, T const *pFBX_TYPE_ParentClass, const char *pFbxFileTypeName=0, const char *pFbxFileSubTypeName=0)
 Runtime class registration.
void UnregisterRuntimeFbxClass(char const *pName)
 Runtime class unregistration.
template<typename T1, typename T2>
kFbxClassId OverrideFbxClass(T1 const *pFBX_TYPE_Class, T2 const *pFBX_TYPE_OverridenClass)
 Override class.
KFbxPlugCreateClass(kFbxClassIdpClassId, char const *pName, const char *pFBXType=0, const char *pFBXSubType=0)
 Create class.
KFbxPlugCreateClass(KFbxObject*pContainer,kFbxClassIdpClassId, const char *pName, const char *pFBXType=0, const char *pFBXSubType=0)
 Create class.
kFbxClassId FindClass(const char *pClassName)
 Find class.
kFbxClassId FindFbxFileClass(const char *pFbxFileTypeName, const char *pFbxFileSubTypeName)
 Find file class.
template<typename T>
void UnregisterFbxClass(T const *pFBX_TYPE_Class)
 Class unregistration.

Data Type Management

KFbxDataType CreateFbxDataType(const char *pName, EFbxType pType)
 Register a new data type to the manager.
KFbxDataTypeconst& GetFbxDataTypeFromName(const char *pDataType)
 Find a data type from the type name.
int GetFbxDataTypeCount()
 List the data types.
KFbxDataTypeGetFbxDataType(int pIndex)
 Find a data types at pIndex.

User Notification Object

KFbxUserNotificationGetUserNotification() const
 Access to the unique UserNotification object.
void SetUserNotification(KFbxUserNotification*pUN)
 Set the user notification.

Message Emitter (for Message Logging)

KFbxMessageEmitter& GetMessageEmitter()
 Access to the unique KFbxMessageEmitter object.
bool SetMessageEmitter(KFbxMessageEmitter *pMessageEmitter)
 Sets to the unique KFbxMessageEmitter object.

Localization Hierarchy

void AddLocalization(KFbxLocalizationManager *pLocManager)
 Add a localization object to the known localization providers.
void RemoveLocalization(KFbxLocalizationManager *pLocManager)
 Remove a localization object from the known localization providers.
bool SetLocale(const char *pLocale)
 Select the current locale for localization.
const char * Localize(const char *pID, const char *pDefault=NULL) const
 Localization helper function.

Sub-Manager Management

KFbxPreviewManager& GetPreviewManager()
 Retrieve the manager responsible for managing object previews.

XRef Manager

KFbxXRefManager& GetXRefManager()
 Retrieve the manager responsible for managing object XRef resolution.

Library Management

KFbxLibraryGetRootLibrary()
 Retrieve the main object Libraries.
KFbxLibraryGetSystemLibraries()
 Retrieve the main object Libraries.
KFbxLibraryGetUserLibraries()
 Retrieve the main object Libraries.

Plug-in Registry Object

KFbxIOPluginRegistryGetIOPluginRegistry() const
 Access to the uniqueKFbxIOPluginRegistryobject.

Fbx Generic Plugins Management

bool LoadPluginsDirectory(char *pFilename, char *pExtensions)
 Load plug-ins directory.
bool LoadPlugin(char *pFilename)
 Load plug-in.
bool UnloadPlugins()
 Unload all plug-ins.
bool EmitPluginsEvent(KFbxEventBaseconst&pEvent)
 Emit plugins event.
KArrayTemplate<KFbxPlugin
const *> 
GetPlugins() const
 Get plugins.
int GetPluginCount(bool pOnlyReadWriteOnes)
 get plugins count
KFbxPluginFindPlugin(char *pName, char *pVersion)
 Find plug in.

IO Settings

void FillIOSettingsForReadersRegistered(KFbxIOSettings&pIOS)
 Fill IO Settings for registered readers.
void FillIOSettingsForWritersRegistered(KFbxIOSettings&pIOS)
 Fill IO Settings for registered writers.
void FillCommonIOSettings(KFbxIOSettings&pIOS, bool pImport)
 Fill common IO Settings.
void Create_Common_Import_IOSettings_Groups(KFbxIOSettings&pIOS)
 Build import groups hierarchies.
void Create_Common_Export_IOSettings_Groups(KFbxIOSettings&pIOS)
 Build export groups hierarchies.
void Add_Common_Import_IOSettings(KFbxIOSettings&pIOS)
 Add common import properties.
void Add_Common_Export_IOSettings(KFbxIOSettings&pIOS)
 Add common export properties.
void Add_Common_RW_Import_IOSettings(KFbxIOSettings&pIOS)
 Add common Read/Write Import properties.
void Add_Common_RW_Export_IOSettings(KFbxIOSettings&pIOS)
 Add common Read/Write export properties.
void Fill_Motion_Base_ReaderIOSettings(KFbxIOSettings&pIOS)
 Fill IO Settings for motion base readers.
void Fill_Motion_Base_WriterIOSettings(KFbxIOSettings&pIOS)
 Fill IO Settings for motion base writers.

Member Enumeration Documentation

enumEError

Error codes.

Enumerator:
eOBJECT_NOT_FOUND The requested object was not found in the Manager's database.

eNAME_ALREADY_IN_USE A name clash occurred.

eERROR_COUNT Mark the end of the error enum.

Definition at line221of filekfbxsdkmanager.h.

Member Function Documentation

static bool SetMemoryAllocator(KFbxMemoryAllocatorpMemoryAllocator ) [static]

SDK Memory management.

Use this method to specify custom memory management routines. The FBX SDK will use the provided routines to allocate and deallocate memory.

Parameters:
pMemoryAllocator The memory allocator to set.
Remarks:
Important: If you plan to specify custom memory management routines, you must do so BEFORE creating the first SDK manager. Those routines are global and thus shared between different instances of SDK managers.

staticKFbxSdkManager* Create( ) [static]

SDK manager allocation method.

Returns:
A pointer to the SDK manager orNULLif this is an evaluation copy of the FBX SDK and it is expired.

virtual void Destroy( ) [virtual]

Destructor.

Deallocates all object previously created by the SDK manager.

kFbxClassIdRegisterFbxClass(char const * pName,
T1 const * pFBX_TYPE_Class,
T2 const * pFBX_TYPE_ParentClass,
const char * pFbxFileTypeName=0,
const char * pFbxFileSubTypeName=0 
)[inline]

Class registration.

Parameters:
pName 
pFBX_TYPE_Class 
pFBX_TYPE_ParentClass 
pFbxFileTypeName 
pFbxFileSubTypeName 
Returns:
The class Id of the newly register class

Definition at line131of filekfbxsdkmanager.h.

kFbxClassIdRegisterRuntimeFbxClass(char const * pName,
T const * pFBX_TYPE_ParentClass,
const char * pFbxFileTypeName=0,
const char * pFbxFileSubTypeName=0 
)[inline]

Runtime class registration.

Parameters:
pName 
pFBX_TYPE_ParentClass 
pFbxFileTypeName 
pFbxFileSubTypeName 
Returns:
The class Id of the newly register class

Definition at line143of filekfbxsdkmanager.h.

void UnregisterRuntimeFbxClass(char const * pName ) [inline]

Runtime class unregistration.

Parameters:
pName The class name.

Definition at line150of filekfbxsdkmanager.h.

kFbxClassIdOverrideFbxClass(T1 const * pFBX_TYPE_Class,
T2 const * pFBX_TYPE_OverridenClass 
)[inline]

Override class.

Parameters:
pFBX_TYPE_Class 
pFBX_TYPE_OverridenClass 
Returns:
The class Id

Definition at line165of filekfbxsdkmanager.h.

KFbxPlug* CreateClass(kFbxClassId pClassId,
char const * pName,
const char * pFBXType=0,
const char * pFBXSubType=0 
)

Create class.

Parameters:
pClassId 
pName 
pFBXType 
pFBXSubType 

KFbxPlug* CreateClass(KFbxObjectpContainer,
kFbxClassId pClassId,
const char * pName,
const char * pFBXType=0,
const char * pFBXSubType=0 
)

Create class.

Parameters:
pContainer 
pClassId 
pName 
pFBXType 
pFBXSubType 

kFbxClassIdFindClass(const char * pClassName ) 

Find class.

Parameters:
pClassName 

kFbxClassIdFindFbxFileClass(const char * pFbxFileTypeName,
const char * pFbxFileSubTypeName 
)

Find file class.

Parameters:
pFbxFileTypeName 
pFbxFileSubTypeName 

void UnregisterFbxClass(T const * pFBX_TYPE_Class ) [inline]

Class unregistration.

Parameters:
pFBX_TYPE_Class 

Definition at line201of filekfbxsdkmanager.h.

KError&GetError( ) 

Retrieve error object.

Returns:
Reference to the Manager's error object.

EErrorGetLastErrorID( ) const

Get last error code.

Returns:
Last error code.

const char* GetLastErrorString( ) const

Get last error string.

Returns:
Textual description of the last error.

KFbxDataTypeCreateFbxDataType(const char * pName,
EFbxType pType 
)

Register a new data type to the manager.

Parameters:
pName The type name.
pType The data type.
Returns:
The newly createdKFbxDataType

KFbxDataTypeconst&GetFbxDataTypeFromName(const char * pDataType ) 

Find a data type from the type name.

Parameters:
pDataType The type name.
Returns:
the found datatype. return null if not found

int GetFbxDataTypeCount( ) 

List the data types.

Returns:
the number of registered datatypes

KFbxDataType&GetFbxDataType(int pIndex ) 

Find a data types at pIndex.

Parameters:
pIndex The data type index.
Returns:
the found datatype. return null if not found

KFbxUserNotification* GetUserNotification( ) const

Access to the unique UserNotification object.

Returns:
The pointer to the user notification orNULLifthe object has not been allocated.

void SetUserNotification(KFbxUserNotificationpUN ) 

Set the user notification.

Parameters:
pUN 

KFbxMessageEmitter&GetMessageEmitter( ) 

Access to the unique KFbxMessageEmitter object.

Returns:
The pointer to the message emitter.

bool SetMessageEmitter(KFbxMessageEmitter * pMessageEmitter ) 

Sets to the unique KFbxMessageEmitter object.

Parameters:
pMessageEmitter the emitter to use, passing NULL will reset to the default emitter. The object will be deleted when the SDK manager is destroyed, thus ownership is transfered.

void AddLocalization(KFbxLocalizationManager * pLocManager ) 

Add a localization object to the known localization providers.

Parameters:
pLocManager the localization object to register.

void RemoveLocalization(KFbxLocalizationManager * pLocManager ) 

Remove a localization object from the known localization providers.

Parameters:
pLocManager the localization object to remove.

bool SetLocale(const char * pLocale ) 

Select the current locale for localization.

Parameters:
pLocale the locale name, for example "fr" or "en-US".

const char* Localize(const char * pID,
const char * pDefault=NULL 
)const

Localization helper function.

Calls each registered localization manager until one can localizes the text.

Parameters:
pID the identifier for the text to localize.
pDefault the default text. Uses pID if NULL.
Returns:
the potentially localized text. May return the parameter passed in.

KFbxPreviewManager&GetPreviewManager( ) 

Retrieve the manager responsible for managing object previews.

Returns:
The Preview manager for this SDK manager.

KFbxXRefManager&GetXRefManager( ) 

Retrieve the manager responsible for managing object XRef resolution.

Returns:
The XRef manager for this SDK manager.

KFbxLibrary* GetRootLibrary( ) 

Retrieve the main object Libraries.

Returns:
The Root library

KFbxLibrary* GetSystemLibraries( ) 

Retrieve the main object Libraries.

Returns:
The Root library

KFbxLibrary* GetUserLibraries( ) 

Retrieve the main object Libraries.

Returns:
The Root library

KFbxIOPluginRegistry* GetIOPluginRegistry( ) const

Access to the uniqueKFbxIOPluginRegistryobject.

Returns:
The pointer to the userKFbxIOPluginRegistry

bool LoadPluginsDirectory(char * pFilename,
char * pExtensions 
)

Load plug-ins directory.

Parameters:
pFilename The directory path.
pExtensions The plug in extention.
Returns:
True

bool LoadPlugin(char * pFilename ) 

Load plug-in.

Parameters:
pFilename The file name
Returns:
True

bool UnloadPlugins( ) 

Unload all plug-ins.

bool EmitPluginsEvent(KFbxEventBaseconst& pEvent ) 

Emit plugins event.

Parameters:
pEvent The event to be emitted.

KArrayTemplate<KFbxPluginconst*>GetPlugins( ) const

Get plugins.

int GetPluginCount(bool pOnlyReadWriteOnes ) 

get plugins count

Parameters:
pOnlyReadWriteOnes Iftrue, only plugins which need read/write are counted, iffalse, all plugins are counted.
Returns:
The number of plugins.

KFbxPlugin* FindPlugin(char * pName,
char * pVersion 
)

Find plug in.

Parameters:
pName The plug in name.
pVersion The plug in version.
Returns:
The plugin,nullif not found.

void FillIOSettingsForReadersRegistered(KFbxIOSettingspIOS ) 

Fill IO Settings for registered readers.

Parameters:
pIOS The properties hierarchies to fill.

void FillIOSettingsForWritersRegistered(KFbxIOSettingspIOS ) 

Fill IO Settings for registered writers.

Parameters:
pIOS The properties hierarchies to fill.

void FillCommonIOSettings(KFbxIOSettingspIOS,
bool pImport 
)

Fill common IO Settings.

Parameters:
pIOS The properties hierarchies to fill.
pImport Iftrue, import properties are set, otherwise export properties are set.

void Create_Common_Import_IOSettings_Groups(KFbxIOSettingspIOS ) 

Build import groups hierarchies.

Parameters:
pIOS The properties hierarchies to fill.

void Create_Common_Export_IOSettings_Groups(KFbxIOSettingspIOS ) 

Build export groups hierarchies.

Parameters:
pIOS The properties hierarchies to fill.

void Add_Common_Import_IOSettings(KFbxIOSettingspIOS ) 

Add common import properties.

Parameters:
pIOS The properties hierarchies to fill.

void Add_Common_Export_IOSettings(KFbxIOSettingspIOS ) 

Add common export properties.

Parameters:
pIOS The properties hierarchies to fill.

void Add_Common_RW_Import_IOSettings(KFbxIOSettingspIOS ) 

Add common Read/Write Import properties.

Parameters:
pIOS The properties hierarchies to fill.

void Add_Common_RW_Export_IOSettings(KFbxIOSettingspIOS ) 

Add common Read/Write export properties.

Parameters:
pIOS The properties hierarchies to fill.

void Fill_Motion_Base_ReaderIOSettings(KFbxIOSettingspIOS ) 

Fill IO Settings for motion base readers.

Parameters:
pIOS The properties hierarchies to fill.

void Fill_Motion_Base_WriterIOSettings(KFbxIOSettingspIOS ) 

Fill IO Settings for motion base writers.

Parameters:
pIOS The properties hierarchies to fill.

void RegisterObject(KFbxPlugconst * pPlug ) 

Register object.

Parameters:
pPlug The object to be registered.

void UnregisterObject(KFbxPlugconst * pPlug ) 

Unregister object.

Parameters:
pPlug The object to be unregistered.

int GetSrcObjectCount(KFbxImageConverterconst *  ) [inline]

Get the count ofKFbxImageConverter.

Definition at line503of filekfbxsdkmanager.h.

KFbxImageConverter* GetSrcObject(KFbxImageConverterconst * ,
int pIndex=0 
)[inline]

Get the (pIndex)thKFbxImageConverter.

Parameters:
pIndex the index.

Definition at line507of filekfbxsdkmanager.h.

int GetSrcObjectCount(KFbxNodeconst *  ) [inline]

Get the count ofKFbxNode.

Definition at line513of filekfbxsdkmanager.h.

KFbxNode* GetSrcObject(KFbxNodeconst * ,
int pIndex=0 
)[inline]

Get the (pIndex)thKFbxNode.

Parameters:
pIndex the index.

Definition at line517of filekfbxsdkmanager.h.

int GetSrcObjectCount(KFbxTextureconst *  ) [inline]

Get the count ofKFbxTexture.

Definition at line523of filekfbxsdkmanager.h.

KFbxTexture* GetSrcObject(KFbxTextureconst * ,
int pIndex=0 
)[inline]

Get the (pIndex)thKFbxTexture.

Parameters:
pIndex the index.

Definition at line527of filekfbxsdkmanager.h.

int GetSrcObjectCount(KFbxClusterconst *  ) [inline]

Get the count ofKFbxCluster.

Definition at line533of filekfbxsdkmanager.h.

KFbxCluster* GetSrcObject(KFbxClusterconst * ,
int pIndex=0 
)[inline]

Get the (pIndex)thKFbxCluster.

Parameters:
pIndex the index.

Definition at line537of filekfbxsdkmanager.h.

int GetSrcObjectCount(KFbxSceneconst *  ) [inline]

Get the count ofKFbxScene.

Definition at line543of filekfbxsdkmanager.h.

KFbxScene* GetSrcObject(KFbxSceneconst * ,
int pIndex=0 
)[inline]

Get the (pIndex)thKFbxScene.

Parameters:
pIndex the index.

Definition at line547of filekfbxsdkmanager.h.

int GetSrcObjectCount(KFbxDocumentconst *  ) [inline]

Get the count ofKFbxDocument.

Definition at line553of filekfbxsdkmanager.h.

KFbxDocument* GetSrcObject(KFbxDocumentconst * ,
int pIndex=0 
)[inline]

Get the (pIndex)thKFbxDocument.

Parameters:
pIndex the index.

Definition at line557of filekfbxsdkmanager.h.

int GetSrcObjectCount(KFbxSurfaceMaterialconst *  ) [inline]

Get the count ofKFbxSurfaceMaterial.

Definition at line563of filekfbxsdkmanager.h.

KFbxSurfaceMaterial* GetSrcObject(KFbxSurfaceMaterialconst * ,
int pIndex=0 
)[inline]

Get the (pIndex)thKFbxSurfaceMaterial.

Parameters:
pIndex the index.

Definition at line567of filekfbxsdkmanager.h.

staticKStringPrefixName(char const * pPrefix,
char const * pName 
)[static]

Add a prefix to a name.

Parameters:
pPrefix The prefix to be added to thepName. This string must contain the "::" characters in order to be considered as a prefix.
pName The name to be prefix.
Returns:
The prefixed string
Remarks:
If a prefix already exists, it is removed before addingpPrefix.