KFbxObject
#include<kfbxobject.h>

Inheritance diagram for KFbxObject:

Inheritance graph
[legend]

List of all members.

Detailed Description

Basic class for object type identification and instance naming.

Definition at line152of filekfbxobject.h.


UpdateId Management

enum eFbxUpdateIdType
virtual kFbxUpdateId GetUpdateId(eFbxUpdateIdType pUpdateId=eUpdateId_Object) const
virtual kFbxUpdateId IncUpdateId(eFbxUpdateIdType pUpdateId=eUpdateId_Object)

Properties access

enum eFbxPropertyNotify
KFbxProperty RootProperty
KFbxProperty GetFirstProperty() const
KFbxProperty GetNextProperty(KFbxPropertyconst&pProperty) const
KFbxProperty FindProperty(const char *pName, bool pCaseSensitive=true) const
 Find a property using its name and its data type.
KFbxProperty FindProperty(const char *pName,KFbxDataTypeconst&pDataType, bool pCaseSensitive=true) const
KFbxProperty FindPropertyHierarchical(const char *pName, bool pCaseSensitive=true) const
KFbxProperty FindPropertyHierarchical(const char *pName,KFbxDataTypeconst&pDataType, bool pCaseSensitive=true) const
KFbxPropertyGetRootProperty()
constKFbxPropertyGetRootProperty() const
KFbxProperty GetClassRootProperty()
virtual bool PropertyNotify(eFbxPropertyNotify pType,KFbxProperty*pProperty)

Cloning and references

virtualKFbxObjectClone(KFbxObject*pContainer,KFbxObject::ECloneTypepCloneType) const
 Creates a clone of this object.
bool IsAReferenceTo(void) const
 Check if this object is a reference clone of another.
KFbxObjectGetReferenceTo(void) const
 If this object is a reference clone, this method returns the original object from which this one was cloned.
bool IsReferencedBy(void) const
 Check if any objects were reference cloned from this one.
int GetReferencedByCount(void) const
 Get the number of objects that were reference cloned from this one.
KFbxObjectGetReferencedBy(int pIndex) const
 Get a reference clone of this object.

Object Name Management

void SetName(char const *pName)
 Set the name of the object.
char const * GetName() const
 Return the full name of the object.
KString GetNameWithoutNameSpacePrefix() const
 Return the name of the object without the namespace qualifier.
KString GetNameWithNameSpacePrefix() const
 Return the name of the object with the namespace qualifier.
void SetInitialName(char const *pName)
 Set the initial name of the object.
char const * GetInitialName() const
 Return the initial name of the object.
KString GetNameSpaceOnly()
 Return the namespace of the object.
void SetNameSpace(KStringpNameSpace)
 Set the namespace of the object.
KArrayTemplate<KString*> GetNameSpaceArray(char identifier)
 Return an array of all the namespace of the object.
KString GetNameOnly() const
 Get the name only (no namespace or prefix) of the object.
KString GetNameSpacePrefix() const
 Set the name of the object.
KFbxObjectID const& GetUniqueID() const
 Set the name of the object.
staticKString RemovePrefix(char *pName)
 Set the name of the object.
staticKString StripPrefix(KString&lName)
 Set the name of the object.
staticKString StripPrefix(const char *pName)
 Set the name of the object.

Off-loading Management

Remarks:
the unloaded state flag can be modified using the SetObjectFlags() method. The ContentIsUnloaded() method below (implemented in this class) is simply a synonym to GetObjectFlags(eCONTENT_UNLOADED_FLAG)


int ContentUnload()
 Unload this object content using the offload peripheral currently set in the document then flush it from memory.
int ContentLoad()
 Load this object content using the offload peripheral currently set in the document.
bool ContentIsLoaded() const
 Returns true if this object content is currently loaded.
void ContentDecrementLockCount()
 Decrement the content lock count of an object.
void ContentIncrementLockCount()
 Increment the content lock count of an object.
bool ContentIsLocked() const
 Returns true if this object content is locked.
virtual void ContentClear()
 Clear this object content from memory.
virtualKFbxPeripheralGetPeripheral()
 Retrieve the peripheral of that object.

Off-loading Serialization section

The methods in this section are, usually, called by a peripheral.

virtual bool ContentWriteTo(KFbxStream&pStream) const
 Write the content of the object to the given stream.
virtual bool ContentReadFrom(constKFbxStream&pStream)
 Read the content of the object from the given stream.

Selection management

virtual bool GetSelected()
virtual void SetSelected(bool pSelected)

Evaluation Info

virtual bool Evaluate(KFbxProperty&pProperty,KFbxEvaluationInfoconst *pEvaluationInfo)

General Object Connection and Relationship Management

bool ConnectSrcObject(KFbxObject*pObject, kFbxConnectionType pType=eFbxConnectionNone)
bool IsConnectedSrcObject(constKFbxObject*pObject) const
bool DisconnectSrcObject(KFbxObject*pObject)
bool DisconnectAllSrcObject()
bool DisconnectAllSrcObject(KFbxCriteria const&pCriteria)
bool DisconnectAllSrcObject(kFbxClassIdpClassId)
bool DisconnectAllSrcObject(kFbxClassIdpClassId, KFbxCriteria const&pCriteria)
int GetSrcObjectCount() const
int GetSrcObjectCount(KFbxCriteria const&pCriteria) const
int GetSrcObjectCount(kFbxClassIdpClassId) const
int GetSrcObjectCount(kFbxClassIdpClassId, KFbxCriteria const&pCriteria) const
KFbxObjectGetSrcObject(int pIndex=0) const
KFbxObjectGetSrcObject(KFbxCriteria const&pCriteria, int pIndex=0) const
KFbxObjectGetSrcObject(kFbxClassIdpClassId, int pIndex=0) const
KFbxObjectGetSrcObject(kFbxClassIdpClassId, KFbxCriteria const&pCriteria, int pIndex=0) const
KFbxObjectFindSrcObject(const char *pName, int pStartIndex=0) const
KFbxObjectFindSrcObject(KFbxCriteria const&pCriteria, const char *pName, int pStartIndex=0) const
KFbxObjectFindSrcObject(kFbxClassIdpClassId, const char *pName, int pStartIndex=0) const
KFbxObjectFindSrcObject(kFbxClassIdpClassId, KFbxCriteria const&pCriteria, const char *pName, int pStartIndex=0) const
template<class T>
bool DisconnectAllSrcObject(T const *pFBX_TYPE)
template<class T>
bool DisconnectAllSrcObject(T const *pFBX_TYPE, KFbxCriteria const&pCriteria)
template<class T>
int GetSrcObjectCount(T const *pFBX_TYPE) const
template<class T>
int GetSrcObjectCount(T const *pFBX_TYPE, KFbxCriteria const&pCriteria) const
template<class T>
T * GetSrcObject(T const *pFBX_TYPE, int pIndex=0) const
template<class T>
T * GetSrcObject(T const *pFBX_TYPE, KFbxCriteria const&pCriteria, int pIndex=0) const
template<class T>
T * FindSrcObject(T const *pFBX_TYPE, const char *pName, int pStartIndex=0) const
template<class T>
T * FindSrcObject(T const *pFBX_TYPE, KFbxCriteria const&pCriteria, const char *pName, int pStartIndex=0) const
bool ConnectDstObject(KFbxObject*pObject, kFbxConnectionType pType=eFbxConnectionNone)
bool IsConnectedDstObject(constKFbxObject*pObject) const
bool DisconnectDstObject(KFbxObject*pObject)
bool DisconnectAllDstObject()
bool DisconnectAllDstObject(KFbxCriteria const&pCriteria)
bool DisconnectAllDstObject(kFbxClassIdpClassId)
bool DisconnectAllDstObject(kFbxClassIdpClassId, KFbxCriteria const&pCriteria)
int GetDstObjectCount() const
int GetDstObjectCount(KFbxCriteria const&pCriteria) const
int GetDstObjectCount(kFbxClassIdpClassId) const
int GetDstObjectCount(kFbxClassIdpClassId, KFbxCriteria const&pCriteria) const
KFbxObjectGetDstObject(int pIndex=0) const
KFbxObjectGetDstObject(KFbxCriteria const&pCriteria, int pIndex=0) const
KFbxObjectGetDstObject(kFbxClassIdpClassId, int pIndex=0) const
KFbxObjectGetDstObject(kFbxClassIdpClassId, KFbxCriteria const&pCriteria, int pIndex=0) const
KFbxObjectFindDstObject(const char *pName, int pStartIndex=0) const
KFbxObjectFindDstObject(KFbxCriteria const&pCriteria, const char *pName, int pStartIndex=0) const
KFbxObjectFindDstObject(kFbxClassIdpClassId, const char *pName, int pStartIndex=0) const
KFbxObjectFindDstObject(kFbxClassIdpClassId, KFbxCriteria const&pCriteria, const char *pName, int pStartIndex=0) const
template<class T>
bool DisconnectAllDstObject(T const *pFBX_TYPE)
template<class T>
bool DisconnectAllDstObject(T const *pFBX_TYPE, KFbxCriteria const&pCriteria)
template<class T>
int GetDstObjectCount(T const *pFBX_TYPE) const
template<class T>
int GetDstObjectCount(T const *pFBX_TYPE, KFbxCriteria const&pCriteria) const
template<class T>
T * GetDstObject(T const *pFBX_TYPE, int pIndex=0) const
template<class T>
T * GetDstObject(T const *pFBX_TYPE, KFbxCriteria const&pCriteria, int pIndex=0) const
template<class T>
T * FindDstObject(T const *pFBX_TYPE, const char *pName, int pStartIndex=0) const
template<class T>
T * FindDstObject(T const *pFBX_TYPE, KFbxCriteria const&pCriteria, const char *pName, int pStartIndex=0) const

General Property Connection and Relationship Management

bool ConnectSrcProperty(KFbxPropertyconst&pProperty)
bool IsConnectedSrcProperty(KFbxPropertyconst&pProperty)
bool DisconnectSrcProperty(KFbxPropertyconst&pProperty)
int GetSrcPropertyCount() const
KFbxProperty GetSrcProperty(int pIndex=0) const
KFbxProperty FindSrcProperty(const char *pName, int pStartIndex=0) const
bool ConnectDstProperty(KFbxPropertyconst&pProperty)
bool IsConnectedDstProperty(KFbxPropertyconst&pProperty)
bool DisconnectDstProperty(KFbxPropertyconst&pProperty)
int GetDstPropertyCount() const
KFbxProperty GetDstProperty(int pIndex=0) const
KFbxProperty FindDstProperty(const char *pName, int pStartIndex=0) const

User data

void SetUserDataPtr(KFbxObjectID const&pUserID, void *pUserData)
void * GetUserDataPtr(KFbxObjectID const&pUserID) const
void SetUserDataPtr(void *pUserData)
void * GetUserDataPtr() const

Document Management

KFbxDocumentGetDocument() const
 Get a pointer to the document containing this object.
KFbxDocumentGetRootDocument() const
 Get a const pointer to the root document containing this object.
KFbxSceneGetScene() const
 Get a pointer to the scene containing this object.

Logging.

void EmitMessage(KFbxMessage *pMessage) const
 Emit a message in all available message emitter in the document or SDK manager.

Localization helper.

virtual const char * Localize(const char *pID, const char *pDefault=NULL) const
 Localization helper function.

Application Implementation Management

KFbxLibraryGetParentLibrary(void) const
 Get a handle on the parent library if exists.
bool AddImplementation(KFbxImplementation *pImplementation)
 Adds an implementation.
bool RemoveImplementation(KFbxImplementation *pImplementation)
 Removes an implementation.
bool HasDefaultImplementation(void) const
 Tells if this shading node has a default implementation.
KFbxImplementation * GetDefaultImplementation(void) const
 Returns the default implementation.
bool SetDefaultImplementation(KFbxImplementation *pImplementation)
 Sets the default implementation.
int GetImplementationCount(const KFbxImplementationFilter *pCriteria=NULL) const
 Returns the number of implementations that correspond to a given criteria.
KFbxImplementation * GetImplementation(int pIndex, const KFbxImplementationFilter *pCriteria=NULL) const
 Returns a handle on the (pIndex)th implementation that corresponds to the given criteria.

Object Storage&&Retrieval

virtualKString GetUrl() const
virtual bool SetUrl(char *pUrl)
virtual bool PopulateLoadSettings(KFbxObject*pSettings, char *pFileName=0)
virtual bool Load(char *pFileName=0)
virtual bool PopulateSaveSettings(KFbxObject*pSettings, char *pFileName=0)
virtual bool Save(char *pFileName=0)

Public Types

enum ECloneType{ ,
  eREFERENCE_CLONE,
  eDEEP_CLONE
}
 Types of clones that can be created for KFbxObjects.More...

Member Enumeration Documentation

Types of clones that can be created for KFbxObjects.

Enumerator:
eREFERENCE_CLONE Changes to original object propagate to clone. Changes to clone do not propagate to original.
eDEEP_CLONE A deep copy of the object. Changes to either the original or clone do not propagate to each other.

Definition at line158of filekfbxobject.h.

Member Function Documentation

virtualKFbxObject* Clone(KFbxObjectpContainer,
KFbxObject::ECloneType pCloneType 
)const[virtual]

Creates a clone of this object.

Parameters:
pContainer The object, typically a document or scene, that will contain the new clone. Can be NULL.
pCloneType The type of clone to create
Returns:
The new clone, or NULL if the specified clone type is not supported.

Reimplemented inKFbxControlSetPlug,KFbxIOSettings,KFbxGeometry,KFbxNodeAttribute,KFbxNurbsCurve, andKFbxProceduralGeometry.

bool IsAReferenceTo(void  ) const

Check if this object is a reference clone of another.

Returns:
true if this object is a clone of another, false otherwise

KFbxObject* GetReferenceTo(void  ) const

If this object is a reference clone, this method returns the original object from which this one was cloned.

Returns:
The original, or NULL if this object is not a reference clone.

bool IsReferencedBy(void  ) const

Check if any objects were reference cloned from this one.

Returns:
true If objects were cloned from this one, false otherwise.

int GetReferencedByCount(void  ) const

Get the number of objects that were reference cloned from this one.

Returns:
The number of objects cloned from this one.

KFbxObject* GetReferencedBy(int pIndex ) const

Get a reference clone of this object.

Parameters:
pIndex Valid values are [0,GetReferencedByCount())
Returns:
The requested clone, or NULL if pIndex is out of range.

void SetName(char const * pName ) 

Set the name of the object.

Parameters:
pName ANULLterminated string.

char const* GetName( ) const

Return the full name of the object.

Returns:
Return aNULLterminated string.

Referenced byKFbxNameFilter::Match().

KStringGetNameWithoutNameSpacePrefix( ) const

Return the name of the object without the namespace qualifier.

Returns:
Return the name in a temporary string.

KStringGetNameWithNameSpacePrefix( ) const

Return the name of the object with the namespace qualifier.

Returns:
Return the name in a temporary string.

void SetInitialName(char const * pName ) 

Set the initial name of the object.

Parameters:
pName ANULLterminated string.

char const* GetInitialName( ) const

Return the initial name of the object.

Returns:
Return aNULLterminated string.

KStringGetNameSpaceOnly( ) 

Return the namespace of the object.

Returns:
Return aNULLterminated string.

void SetNameSpace(KString pNameSpace ) 

Set the namespace of the object.

Returns:
Return aNULLterminated string.

KArrayTemplate<KString*>GetNameSpaceArray(char identifier ) 

Return an array of all the namespace of the object.

Returns:
Return aNULLterminated string.

KStringGetNameOnly( ) const

Get the name only (no namespace or prefix) of the object.

Returns:
Return aNULLterminated string.

KStringGetNameSpacePrefix( ) const

Set the name of the object.

Parameters:
pName ANULLterminated string.

staticKStringRemovePrefix(char * pName ) [static]

Set the name of the object.

Parameters:
pName ANULLterminated string.

staticKStringStripPrefix(KStringlName ) [static]

Set the name of the object.

Parameters:
pName ANULLterminated string.

staticKStringStripPrefix(const char * pName ) [static]

Set the name of the object.

Parameters:
pName ANULLterminated string.

KFbxObjectID const&GetUniqueID( ) const

Set the name of the object.

Parameters:
pName ANULLterminated string.

int ContentUnload( ) 

Unload this object content using the offload peripheral currently set in the document then flush it from memory.

Returns:
2 if the object's content is already unloaded or 1 if this object content has been successfully unloaded to the current peripheral.
Remarks:
If the content is locked more than once or the peripheral cannot handle this object unload or an error occurred, the method will return 0 and the content is not flushed.

int ContentLoad( ) 

Load this object content using the offload peripheral currently set in the document.

Returns:
1 if this object content has been successfully loaded from the current peripheral. 2 If the content is already loaded and 0 if an error occurred or there is a lock on the object content.
Remarks:
On a successful Load attempt, the object content is locked.

bool ContentIsLoaded( ) const

Returns true if this object content is currently loaded.

Remarks:
An object that has not been filled yet must be considered unloaded.

void ContentDecrementLockCount( ) 

Decrement the content lock count of an object.

If the content lock count of an object is greater than 0, the content of the object is considered locked.

void ContentIncrementLockCount( ) 

Increment the content lock count of an object.

If the content lock count of an object is greater than 0, the content of the object is considered locked.

bool ContentIsLocked( ) const

Returns true if this object content is locked.

The content is locked if the content lock count is greater than 0

Remarks:
A locked state prevents the object content to be unloaded from memory but does not block the loading.

virtual void ContentClear( ) [protected, virtual]

Clear this object content from memory.

This method has to be overridden in the derived classes.

Remarks:
This method is called byContentUnload()upon success.

virtualKFbxPeripheral* GetPeripheral( ) [protected, virtual]

Retrieve the peripheral of that object.

Returns:
Return the current peripheral for that object
Remarks:
A peripheral manipulates the content of an object for instance, a peripheral can load the connections of an object on demand.

Reimplemented inKFbxDocument.

virtual bool ContentWriteTo(KFbxStreampStream ) const[virtual]

Write the content of the object to the given stream.

Parameters:
pStream The destination stream.
Returns:
True if the content has been successfully processed by the receiving stream.

Reimplemented inKFbxGeometryBase, andKFbxPatch.

virtual bool ContentReadFrom(constKFbxStreampStream ) [virtual]

Read the content of the object from the given stream.

Parameters:
pStream The source streak.
Returns:
True if the object has been able to fill itself with the received data from the stream.

Reimplemented inKFbxGeometryBase, andKFbxPatch.

KFbxPropertyFindProperty(const char * pName,
bool pCaseSensitive=true 
)const[inline]

Find a property using its name and its data type.

Parameters:
pName The name of the property as aNULLterminated string.
pCaseSensitive 
Returns:
A validKFbxPropertyif the property was found, else an invalidKFbxProperty. See KFbxProperty::IsValid()

Definition at line417of filekfbxobject.h.

KFbxDocument* GetDocument( ) const

Get a pointer to the document containing this object.

Returns:
Return a pointer to the document containing this object orNULLif the object does not belong to any document.

Referenced byKFbxDocument::IsARootDocument().

KFbxDocument* GetRootDocument( ) const

Get a const pointer to the root document containing this object.

Returns:
Return a const pointer to the root document containing this object orNULLif the object does not belong to any document.

KFbxScene* GetScene( ) const

Get a pointer to the scene containing this object.

Returns:
Return a pointer to the scene containing this object orNULLif the object does not belong to any scene.

void EmitMessage(KFbxMessage * pMessage ) const

Emit a message in all available message emitter in the document or SDK manager.

Parameters:
pMessage the message to emit. Ownership is transfered, do not delete.

virtual const char* Localize(const char * pID,
const char * pDefault=NULL 
)const[virtual]

Localization helper function.

Calls the FBX SDK manager implementation. sub-classes which manage their own localization could over-ride this.

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.

Reimplemented inKFbxLibrary.

KFbxLibrary* GetParentLibrary(void  ) const

Get a handle on the parent library if exists.

Reimplemented inKFbxLibrary.

bool AddImplementation(KFbxImplementation * pImplementation ) 

Adds an implementation.

Parameters:
pImplementation a handle on an implementation
Returns:
true on success, false otherwise
Remarks:
to succeed this function needs to be called with an implementation that has not already been added to this node.

bool RemoveImplementation(KFbxImplementation * pImplementation ) 

Removes an implementation.

Parameters:
pImplementation a handle on an implementation
Returns:
true on success, false otherwise
Remarks:
to succeed this function needs to be called with an implementation that has already been added to this node.

bool HasDefaultImplementation(void  ) const

Tells if this shading node has a default implementation.

KFbxImplementation* GetDefaultImplementation(void  ) const

Returns the default implementation.

bool SetDefaultImplementation(KFbxImplementation * pImplementation ) 

Sets the default implementation.

Parameters:
pImplementation a handle on an implementation
Returns:
true on success, false otherwise
Remarks:
to succeed this function needs to be called with an implementation that has already been added to this node.

int GetImplementationCount(const KFbxImplementationFilter * pCriteria=NULL ) const

Returns the number of implementations that correspond to a given criteria.

Parameters:
pCriteria filtering criteria that identifyies the kind of implementations to take into account.
Returns:
the number of implementation(s)

KFbxImplementation* GetImplementation(int pIndex,
const KFbxImplementationFilter * pCriteria=NULL 
)const

Returns a handle on the (pIndex)th implementation that corresponds to the given criteria.

Parameters:
pIndex 
pCriteria filtering criteria that identifyies the kind of implementations to take into account.
Remarks:
returns NULL if the criteria or the index are invalid