KFbxSdkManager Class Reference

#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 line 142 of file kfbxsdkmanager.h.

Error Management

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

Memory Management.

static bool SetMemoryAllocator (KFbxMemoryAllocator *pMemoryAllocator)
 SDK Memory management Use this method to specify custom memory management routines.

FBX SDK Manager creation/destruction.

static KFbxSdkManagerCreateKFbxSdkManager ()
 SDK manager allocation method.
virtual void DestroyKFbxSdkManager ()
 Destructor.

plug and object definition and management

template<typename T1, typename T2>
kFbxClassId RegisterClass (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 RegisterRuntimeClass (char const *pName, T const *pFBX_TYPE_ParentClass, const char *pFbxFileTypeName=0, const char *pFbxFileSubTypeName=0)
 Class registration.
template<typename T1, typename T2>
kFbxClassId OverrideClass (T1 const *pFBX_TYPE_Class, T2 const *pFBX_TYPE_OverridenClass)
 Class registration.
KFbxPlugCreateClass (kFbxClassId, char const *pName)
 Class registration.
kFbxClassId FindClass (char const *pClassName)
 Class registration.
kFbxClassId FindFbxFileClass (const char *pFbxFileTypeName, const char *pFbxFileSubTypeName)
 Class registration.

General Object Connection and Relationship Management

int GetSrcObjectCount (kFbxClassId pClassId)
 Get the number of objects of class pClassId.
int GetSrcObjectCount ()
 Get the number of objects of class pClassId.
template<class T>
int GetSrcObjectCount (T const *pFBX_TYPE)
 Get the number of objects of class pClassId.
KFbxObjectGetSrcObject (kFbxClassId pClassId, int pIndex=0)
 Get the [i]th object of class pClassId.
KFbxObjectGetSrcObject (int pIndex=0)
 Get the number of objects of class pClassId.
template<class T>
T * GetSrcObject (T const *pFBX_TYPE, int pIndex=0)
 Get the number of objects of class pClassId.
KFbxObjectFindSrcObject (kFbxClassId pClassId, const char *pName, int pStartIndex=0)
 Find the object of class pClassId that has the name pName.
KFbxObjectFindSrcObject (const char *pName, int pStartIndex=0)
 Get the number of objects of class pClassId.
template<class T>
T * FindSrcObject (T const *pFBX_TYPE, const char *pName, int pStartIndex=0)
 Get the number of objects of class pClassId.

datatype management

KFbxDataType CreateFbxDataType (char *pName, EFbxType pType)
 Register a new datatype to the manager.
KFbxDataType const & GetFbxDataTypeFromName (char *pDataType)
 Finds a datatype.

Depricated Object Creation

Create specific object of class X (X must derive from KFbxPlug), These functions are deprecated please use Object::Create instead This section contains creation methods for the different objects of the FBX SDK.

Objects of the FBX SDK can be derived. The derived object can be properly created by overwritting the corresponding virtual allocator routine. See the protected section below.

K_DEPRECATED KFbxSceneCreateKFbxScene ()
K_DEPRECATED KFbxNodeCreateKFbxNode (char const *pName)
K_DEPRECATED KFbxNullCreateKFbxNull ()
K_DEPRECATED KFbxMarkerCreateKFbxMarker ()
K_DEPRECATED KFbxCameraCreateKFbxCamera ()
K_DEPRECATED KFbxLightCreateKFbxLight ()
K_DEPRECATED KFbxSkeletonCreateKFbxSkeleton ()
K_DEPRECATED KFbxMeshCreateKFbxMesh (char const *pName="")
K_DEPRECATED KFbxPatchCreateKFbxPatch (char const *pName="")
K_DEPRECATED KFbxNurbCreateKFbxNurb (char const *pName="")
K_DEPRECATED KFbxNurbsSurfaceCreateKFbxNurbsSurface (char const *pName="")
K_DEPRECATED KFbxNurbsCurveCreateKFbxNurbsCurve (char const *pName="")
K_DEPRECATED KFbxTrimNurbsSurfaceCreateKFbxTrimNurbsSurface (char const *pName="")
K_DEPRECATED KFbxBoundaryCreateKFbxBoundary (char const *pName="")
K_DEPRECATED KFbxGeometryWeightedMapCreateKFbxGeometryWeightedMap (char const *pName="")
K_DEPRECATED KFbxOpticalReferenceCreateKFbxOpticalReference ()
K_DEPRECATED KFbxLinkCreateKFbxLink ()
K_DEPRECATED KFbxSurfaceMaterialCreateKFbxSurfaceMaterial (char const *pName)
K_DEPRECATED KFbxShapeCreateKFbxShape ()
K_DEPRECATED KFbxTextureCreateKFbxTexture (char const *pName)
K_DEPRECATED KFbxVideoCreateKFbxVideo (char const *pName)
K_DEPRECATED KFbxPoseCreateKFbxPose (char const *pName, bool pIsBindPose)
K_DEPRECATED KFbxGenericNodeCreateKFbxGenericNode (char const *pName)
K_DEPRECATED KFbxSkinCreateKFbxSkin (char const *pName)
K_DEPRECATED KFbxClusterCreateKFbxCluster (char const *pName)
K_DEPRECATED KFbxThumbnailCreateKFbxThumbnail ()
K_DEPRECATED KFbxSceneInfoCreateKFbxSceneInfo ()
K_DEPRECATED KFbxGeometryConverterCreateKFbxGeometryConverter ()
K_DEPRECATED KFbxImageConverterCreateKFbxImageConverter ()
K_DEPRECATED KFbxExporterCreateKFbxExporter ()
K_DEPRECATED KFbxImporterCreateKFbxImporter ()
K_DEPRECATED KFbxConstraintCreateKFbxConstraint (char const *pName, int pType)
K_DEPRECATED KFbxCharacterCreateKFbxCharacter (char const *pName)
K_DEPRECATED KFbxCharacterPoseCreateKFbxCharacterPose (char const *pName)
K_DEPRECATED KFbxControlSetPlugCreateKFbxControlSetPlug (char const *pName)
virtual KFbxUserNotificationAllocateKFbxUserNotification (const KString &pLogFileName, const KString &pSessionDescription)
KFbxUserNotificationCreateKFbxUserNotification (const KString &pLogFileName, const KString &pSessionDescription)

Deprecated Object Destruction

Destroy and deallocate specific object of class X (X must derive from KFbxPlug), These functions are deprecated please use Object->Destroy() instead

virtual K_DEPRECATED bool DestroyKFbxScene (KFbxScene *pScene, bool pDestroyContent=true)
virtual K_DEPRECATED bool DestroyKFbxNode (KFbxNode *pNode, bool pDestroyContent=true)
virtual K_DEPRECATED bool DestroyKFbxNodeAttribute (KFbxNodeAttribute *pNodeAttribute)
virtual K_DEPRECATED bool DestroyKFbxGeometryWeightedMap (KFbxGeometryWeightedMap *pGeometryWeightedMap)
virtual K_DEPRECATED bool DestroyKFbxLink (KFbxLink *pLink)
virtual K_DEPRECATED bool DestroyKFbxSurfaceMaterial (KFbxSurfaceMaterial *pMaterial)
virtual K_DEPRECATED bool DestroyKFbxShape (KFbxShape *pShape)
virtual K_DEPRECATED bool DestroyKFbxTexture (KFbxTexture *pTexture)
virtual K_DEPRECATED bool DestroyKFbxVideo (KFbxVideo *pVideo)
virtual K_DEPRECATED bool DestroyKFbxPose (KFbxPose *pPose)
virtual K_DEPRECATED bool DestroyKFbxGenericNode (KFbxGenericNode *pGenericNode)
virtual K_DEPRECATED bool DestroyKFbxDeformer (KFbxDeformer *pDeformer)
virtual K_DEPRECATED bool DestroyKFbxSubDeformer (KFbxSubDeformer *pSubDeformer)
virtual K_DEPRECATED bool DestroyKFbxThumbnail (KFbxThumbnail *pThumbnail)
virtual K_DEPRECATED bool DestroyKFbxSceneInfo (KFbxSceneInfo *pSceneInfo)
K_DEPRECATED bool DestroyKFbxGeometryConverter (KFbxGeometryConverter *pConverter)
K_DEPRECATED bool DestroyKFbxImageConverter (KFbxImageConverter *pConverter)
K_DEPRECATED bool DestroyKFbxExporter (KFbxExporter *pExporter)
K_DEPRECATED bool DestroyKFbxImporter (KFbxImporter *pImporter)
K_DEPRECATED bool DestroyKFbxConstraint (KFbxConstraint *pConstraint)
K_DEPRECATED bool DestroyKFbxCharacter (KFbxCharacter *pCharacter)
K_DEPRECATED bool DestroyKFbxCharacterPose (KFbxCharacterPose *pCharacterPose)
K_DEPRECATED bool DestroyKFbxControlSetPlug (KFbxControlSetPlug *pControlSetPlug)
virtual bool DestroyKFbxUserNotification ()

Deprecated Object Search

Replaced by FindObjectSrc

virtual K_DEPRECATED KFbxNodeFindKFbxNode (char const *pName, int pIndex=0)
virtual K_DEPRECATED KFbxSurfaceMaterialFindKFbxSurfaceMaterial (char const *pName, int pIndex=0)
virtual K_DEPRECATED KFbxTextureFindKFbxTexture (char const *pName, int pIndex=0)
virtual K_DEPRECATED KFbxVideoFindKFbxVideo (char const *pName, int pIndex=0)
virtual K_DEPRECATED KFbxPoseFindKFbxPose (char const *pName, int pIndex=0)
virtual K_DEPRECATED KFbxGenericNodeFindKFbxGenericNode (char const *pName, int pIndex=0)

Deprecated Access to object Object Count

Replaced by GetObjectSrcCount and GetObjectSrc

K_DEPRECATED int GetKFbxNodeCount ()
K_DEPRECATED KFbxNodeGetKFbxNode (int pIndex)
K_DEPRECATED int GetKFbxGenericNodeCount ()
K_DEPRECATED KFbxGenericNodeGetKFbxGenericNode (int pIndex)
K_DEPRECATED int GetKFbxSurfaceMaterialCount ()
K_DEPRECATED KFbxSurfaceMaterialGetKFbxSurfaceMaterial (int pIndex)
K_DEPRECATED int GetKFbxTextureCount ()
K_DEPRECATED KFbxTextureGetKFbxTexture (int pIndex)
K_DEPRECATED int GetKFbxVideoCount ()
K_DEPRECATED KFbxVideoGetKFbxVideo (int pIndex)
K_DEPRECATED int GetKFbxPoseCount ()
K_DEPRECATED KFbxPoseGetKFbxPose (int pIndex)
K_DEPRECATED int GetKFbxLinkCount ()
K_DEPRECATED KFbxLinkGetKFbxLink (int pIndex)
K_DEPRECATED int GetKFbxConstraintCount ()
K_DEPRECATED int GetKFbxConstraintCount (int pType)
K_DEPRECATED KFbxConstraintGetKFbxConstraint (int pIndex, int pType)
K_DEPRECATED int GetKFbxCharacterCount ()
K_DEPRECATED KFbxCharacterGetKFbxCharacter (int pIndex)
K_DEPRECATED int GetKFbxCharacterPoseCount ()
K_DEPRECATED KFbxCharacterPoseGetKFbxCharacterPose (int pIndex)
K_DEPRECATED int GetKFbxControlSetPlugCount ()
K_DEPRECATED KFbxControlSetPlugGetKFbxControlSetPlug (int pIndex)
K_DEPRECATED int GetKFbxGeometryWeightedMapCount ()
K_DEPRECATED KFbxGeometryWeightedMapGetKFbxGeometryWeightedMap (int pIndex)
K_DEPRECATED int GetKFbxSceneCount ()
K_DEPRECATED KFbxSceneGetKFbxScene (int pIndex)
KFbxUserNotificationGetUserNotification ()
 Access to the unique UserNotification object.

Static Public Member Functions

static KString PrefixName (char const *pPrefix, char const *pName)
 Add a prefix to a name.


Member Enumeration Documentation

enum EError

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 line 258 of file kfbxsdkmanager.h.


Member Function Documentation

static bool SetMemoryAllocator ( KFbxMemoryAllocator pMemoryAllocator  )  [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.

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.

static KFbxSdkManager* CreateKFbxSdkManager (  )  [static]

SDK manager allocation method.

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

virtual void DestroyKFbxSdkManager (  )  [virtual]

Destructor.

Deallocates all object previously created by the SDK manager.

kFbxClassId RegisterClass ( 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:
pFBX_TYPE_Class 
pFBX_TYPE_ParentClass 
pName 
pFbxFileTypeName 
pFbxFileSubTypeName 
Returns:
The class Id of the newly register class

Definition at line 194 of file kfbxsdkmanager.h.

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

Class registration.

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

Definition at line 201 of file kfbxsdkmanager.h.

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

Class registration.

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

Definition at line 205 of file kfbxsdkmanager.h.

KFbxPlug* CreateClass ( kFbxClassId  ,
char const *  pName 
)

Class registration.

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

kFbxClassId FindClass ( char const *  pClassName  ) 

Class registration.

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

kFbxClassId FindFbxFileClass ( const char *  pFbxFileTypeName,
const char *  pFbxFileSubTypeName 
)

Class registration.

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

int GetSrcObjectCount ( kFbxClassId  pClassId  ) 

Get the number of objects of class pClassId.

Returns:
Return the number of pClassId objects owned by the manager.
Remarks:
the class id can be optained by calling <Class>Classid

Referenced by KFbxGetSrcCount().

int GetSrcObjectCount (  )  [inline]

Get the number of objects of class pClassId.

Returns:
Return the number of pClassId objects owned by the manager.
Remarks:
the class id can be optained by calling <Class>Classid

Definition at line 226 of file kfbxsdkmanager.h.

int GetSrcObjectCount ( T const *  pFBX_TYPE  )  [inline]

Get the number of objects of class pClassId.

Returns:
Return the number of pClassId objects owned by the manager.
Remarks:
the class id can be optained by calling <Class>Classid

Definition at line 227 of file kfbxsdkmanager.h.

KFbxObject* GetSrcObject ( kFbxClassId  pClassId,
int  pIndex = 0 
)

Get the [i]th object of class pClassId.

Returns:
Return the pointer to the object owned by the manager.
Remarks:
the class id can be optained by calling <Class>Classid

Referenced by KFbxGetSrc().

KFbxObject* GetSrcObject ( int  pIndex = 0  )  [inline]

Get the number of objects of class pClassId.

Returns:
Return the number of pClassId objects owned by the manager.
Remarks:
the class id can be optained by calling <Class>Classid

Definition at line 233 of file kfbxsdkmanager.h.

T* GetSrcObject ( T const *  pFBX_TYPE,
int  pIndex = 0 
) [inline]

Get the number of objects of class pClassId.

Returns:
Return the number of pClassId objects owned by the manager.
Remarks:
the class id can be optained by calling <Class>Classid

Definition at line 234 of file kfbxsdkmanager.h.

KFbxObject* FindSrcObject ( kFbxClassId  pClassId,
const char *  pName,
int  pStartIndex = 0 
)

Find the object of class pClassId that has the name pName.

Parameters:
pName Name of the node.
pStartIndex Zero based index specifiyng where the search begins
Returns:
Return the pointer to the object owned by the manager.
Remarks:
the class id can be optained by calling <Class>Classid

Referenced by KFbxFindSrc().

KFbxObject* FindSrcObject ( const char *  pName,
int  pStartIndex = 0 
) [inline]

Get the number of objects of class pClassId.

Returns:
Return the number of pClassId objects owned by the manager.
Remarks:
the class id can be optained by calling <Class>Classid

Definition at line 242 of file kfbxsdkmanager.h.

T* FindSrcObject ( T const *  pFBX_TYPE,
const char *  pName,
int  pStartIndex = 0 
) [inline]

Get the number of objects of class pClassId.

Returns:
Return the number of pClassId objects owned by the manager.
Remarks:
the class id can be optained by calling <Class>Classid

Definition at line 243 of file kfbxsdkmanager.h.

KError& GetError (  ) 

Retrieve error object.

Returns:
Reference to the Manager's error object.

EError GetLastErrorID (  ) 

Get last error code.

Returns:
Last error code.

char* GetLastErrorString (  ) 

Get last error string.

Returns:
Textual description of the last error.

static KString PrefixName ( char const *  pPrefix,
char const *  pName 
) [static]

Add a prefix to a name.

Parameters:
pPrefix The prefix to be added to the pName. 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 adding pPrefix.

KFbxDataType CreateFbxDataType ( char *  pName,
EFbxType  pType 
)

Register a new datatype to the manager.

Returns:
true if it success

KFbxDataType const& GetFbxDataTypeFromName ( char *  pDataType  ) 

Finds a datatype.

Returns:
the found datatype. return null if not found

KFbxUserNotification* GetUserNotification (  ) 

Access to the unique UserNotification object.

Returns:
The pointer to the user notification or NULL if the object has not been allocated.