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

#include <fbxnamehandler.h>

Class Description

A name is a case-sensitive string ID of a property, a node, a node attribute, a texture, etc.

The characters constituting a name has no specific limitation. An initial name is the original name (from importing a file, for example), which is saved up for reversible renaming. A current name is the name used in FBX. A namespace is a simple grouping of objects under a given name. Namespaces are primarily used to resolve name-clash issues in FBX, where a new object has the same name as an existing object.

For example, Maya only accepts names with letters, digits, or underscores. And when a user import FBX into Maya, a node whose name contains whitespace will be renamed. But the connections and references to this node in FBX scene graph still use the original name, so users have to use the initial name to retrieve related information.

Definition at line 34 of file fbxnamehandler.h.

Public Member Functions

 FbxNameHandler (const char *pInitialName="")
 Constructor. More...
 
 FbxNameHandler (FbxNameHandler const &pName)
 Copy constructor. More...
 
 ~FbxNameHandler ()
 
void SetInitialName (const char *pInitialName)
 Set the initial name. More...
 
const char * GetInitialName () const
 Get the initial name. More...
 
void SetCurrentName (const char *pNewName)
 Set the current name. More...
 
const char * GetCurrentName () const
 Get the current name. More...
 
void SetNameSpace (const char *pNameSpace)
 Set the namespace. More...
 
const char * GetNameSpace () const
 Get the namespace. More...
 
bool IsRenamed () const
 Check if the current name and initial name match. More...
 
FbxNameHandleroperator= (FbxNameHandler const &pName)
 Assignment operator. More...
 
FbxArray< FbxString * > GetNameSpaceArray (char identifier)
 Get the namespaces in a string pointer array format. More...
 

Private use for the renaming strategies classes.

Some renaming strategies classes need to store the parent name to successfully apply the renaming algorithms.

The methods in this section allow them to do so.

Remarks
Because of the very specific use of the mParentName string, callers of the FbxNameHandler class should never assume that mParentName is correctly initialized nor contains a meaningful value outside the scope of the renaming strategy class that used it.
void SetParentName (const char *pParentName)
 Set the parent name. More...
 
const char * GetParentName () const
 Get the parent name. More...
 

Constructor & Destructor Documentation

◆ FbxNameHandler() [1/2]

FbxNameHandler ( const char *  pInitialName = "")

Constructor.

Parameters
pInitialNameName string used to initialize both members (initialName and currentName) of this class.

◆ FbxNameHandler() [2/2]

FbxNameHandler ( FbxNameHandler const &  pName)

Copy constructor.

Parameters
pNameA FbxNameHandler copied to this one.

◆ ~FbxNameHandler()

Member Function Documentation

◆ SetInitialName()

void SetInitialName ( const char *  pInitialName)

Set the initial name.

Parameters
pInitialNameNew string for the initial name.
Remarks
The current name will also be changed to this value.

◆ GetInitialName()

const char* GetInitialName ( ) const

Get the initial name.

Returns
Pointer to the InitialName string buffer.

◆ SetCurrentName()

void SetCurrentName ( const char *  pNewName)

Set the current name.

Parameters
pNewNameNew string for the current name.
Remarks
The initial name is not affected.

◆ GetCurrentName()

const char* GetCurrentName ( ) const

Get the current name.

Returns
Pointer to the CurrentName string buffer.
Examples:
ImportScene/DisplayPose.cxx.

◆ SetNameSpace()

void SetNameSpace ( const char *  pNameSpace)

Set the namespace.

Parameters
pNameSpaceNew string for the namespace.
Remarks
The initial name is not affected.

◆ GetNameSpace()

const char* GetNameSpace ( ) const

Get the namespace.

Returns
Pointer to the namespace string buffer.

◆ IsRenamed()

bool IsRenamed ( ) const

Check if the current name and initial name match.

Returns
true if the current name isn't identical to the initial name.

◆ operator=()

FbxNameHandler& operator= ( FbxNameHandler const &  pName)

Assignment operator.

Parameters
pNameFbxNameHandler assigned to this one.

◆ SetParentName()

void SetParentName ( const char *  pParentName)

Set the parent name.

Parameters
pParentNameNew string for the parent name.
Remarks
The parent name here could combine several hierarchy name. The full name should be "ParentName + CurrentName". A |_B |_C For the above hierarchy, the parent name of C is "AB". The full name of C is "ABC".

◆ GetParentName()

const char* GetParentName ( ) const

Get the parent name.

Returns
Pointer to the ParentName string buffer.

◆ GetNameSpaceArray()

FbxArray<FbxString*> GetNameSpaceArray ( char  identifier)

Get the namespaces in a string pointer array format.

Returns
FbxArray<FbxString*> .
Remarks
The array is filled in reverse order. For example, with a namespace string defined as: a:b:c:d, the filled array is: array[0]=d, array[1]=c, array[2]=b and array[3]=a

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