Public Member Functions

KName Class Reference

This reference page is linked to from the following overview topics: List of Python FBX classes.


Search for all occurrences

Detailed 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 59 of file kname.h.

#include <kname.h>

List of all members.

Public Member Functions

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

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 KName 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 (char const *pParentName)
  Set the parent name.
char const *  GetParentName () const
  Get the parent name.

Constructor & Destructor Documentation

KName ( char const *  pInitialName = "" )

Constructor.

Parameters:
pInitialName Name string used to initialize both members (initialName and currentName) of this class.
KName ( KName const &  pName )

Copy constructor.

Parameters:
pName A KName copied to this one.
~KName ( )

Member Function Documentation

void SetInitialName ( char const *  pInitialName )

Set the initial name.

Parameters:
pInitialName New string for the initial name.
Remarks:
The current name will also be changed to this value.
char const* GetInitialName ( ) const

Get the initial name.

Returns:
Pointer to the InitialName string buffer.
void SetCurrentName ( char const *  pNewName )

Set the current name.

Parameters:
pNewName New string for the current name.
Remarks:
The initial name is not affected.
char const* GetCurrentName ( ) const

Get the current name.

Returns:
Pointer to the CurrentName string buffer.
Examples:
ImportScene/DisplayPose.cxx.
void SetNameSpace ( char const *  pNameSpace )

Set the namespace.

Parameters:
pNameSpace New string for the namespace.
Remarks:
The initial name is not affected.
char const* GetNameSpace ( ) const

Get the namespace.

Returns:
Pointer to the namespace string buffer.
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.
KName& operator= ( KName const &  pName )

Assignment operator.

Parameters:
pName KName assigned to this one.
void SetParentName ( char const *  pParentName )

Set the parent name.

Parameters:
pParentName New 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".
char const* GetParentName ( ) const

Get the parent name.

Returns:
Pointer to the ParentName string buffer.
KArrayTemplate<KString*> GetNameSpaceArray ( char  identifier )

Get the namespaces in a string pointer array format.

Returns:
KArrayTemplate<KString*> .

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

KName KName KName KName KName KName KName KName KName KName
KName KName KName KName KName KName KName KName KName KName