This reference page is linked to from the following overview topics: List of Python FBX classes.
The KFbxRenamingStrategy object can be set to rename all the objects in a scene.
It can remove name clashing, remove illegal characters, manage namespaces and manage backward compatibility. It is better to choose KFbxSceneRenamer instead of this class to simplify the usage.
Definition at line 61 of file kfbxrenamingstrategy.h.
#include <kfbxrenamingstrategy.h>
Classes |
|
struct | NameCell |
Public Types |
|
enum | EMode { eTO_FBX, eFROM_FBX, eMODE_COUNT } |
The mode describing the convention direction, from FBX format or to FBX format. More... |
|
enum | EClashType { eNAMECLASH_AUTO, eNAMECLASH_TYPE1, eNAMECLASH_TYPE2 } |
|
|
Public Member Functions |
|
KFbxRenamingStrategy (EMode pMod, bool pOnCreationRun=false) | |
Constructor. |
|
virtual | ~KFbxRenamingStrategy () |
Destructor. |
|
virtual bool | Rename (KName &pName) |
Rename a name if necessary. |
|
virtual void | Clear () |
Resets internal state regarding assigned
names. |
|
virtual KRenamingStrategy * | Clone () |
Create a dynamic renaming strategy instance
of the same type as the child class. |
|
void | SetClashSoverType (EClashType pType) |
Setup the strategy to perform this
algorithm. |
|
virtual char * | GetNameSpace () |
Get the namespace of the last renamed
object. |
|
virtual void | SetInNameSpaceSymbol (KString pNameSpaceSymbol) |
Sets the current scene namespace symbol.
|
|
virtual void | SetOutNameSpaceSymbol (KString pNameSpaceSymbol) |
Sets the wanted scene namespace symbol.
|
|
virtual void | SetCaseSensibility (bool pIsCaseSensitive) |
Sets case sensitivity for name clashing.
|
|
virtual void | SetReplaceNonAlphaNum (bool pReplaceNonAlphaNum) |
Sets the flag for character acceptance
during renaming. |
|
virtual void | SetFirstNotNum (bool pFirstNotNum) |
Sets the flag for first character acceptance
during renaming. |
|
virtual bool | RenameUnparentNameSpace (KFbxNode *pNode, bool pIsRoot=false) |
Recursively renames all the unparented
namespaced objects (Prefix mode) starting from this node. |
|
virtual bool | RemoveImportNameSpaceClash (KFbxNode *pNode) |
Recursively removes all the unparented
namespaced "key" starting from this node. |
|
virtual void | GetParentsNameSpaceList (KFbxNode *pNode, KArrayTemplate< KString * > &pNameSpaceList) |
virtual bool | PropagateNameSpaceChange (KFbxNode *pNode, KString OldNS, KString NewNS) |
Static Public Member Functions |
|
static char * | NoPrefixName (char const *pName) |
Returns a name with its prefix removed.
|
|
static char * | NoPrefixName (KString &pName) |
Returns a name with its prefix removed.
|
|
Protected Member Functions |
|
virtual bool | RenameToFBX (KName &pName) |
virtual bool | RenameFromFBX (KName &pName) |
virtual KString & | ReplaceNonAlphaNum (KString &pName, char *pReplace, bool pIgnoreNameSpace) |
Protected Attributes |
|
EMode | mMode |
EClashType | mType |
KCharPtrSet | mStringNameArray |
KArrayTemplate< NameCell * > | mExistingNsList |
bool | mOnCreationRun |
bool | mCaseSensitive |
bool | mReplaceNonAlphaNum |
bool | mFirstNotNum |
KString | mNameSpace |
KString | mInNameSpaceSymbol |
KString | mOutNameSpaceSymbol |
enum EMode |
The mode describing the convention direction, from FBX format or to FBX format.
Definition at line 69 of file kfbxrenamingstrategy.h.
{ eTO_FBX, eFROM_FBX, eMODE_COUNT };
enum EClashType |
Definition at line 115 of file kfbxrenamingstrategy.h.
KFbxRenamingStrategy | ( | EMode | pMod, |
bool | pOnCreationRun =
false |
||
) |
Constructor.
pMod | The mode describing the convention direction, from FBX format or to FBX format. |
pOnCreationRun |
virtual ~KFbxRenamingStrategy | ( | ) | [virtual] |
Destructor.
virtual bool Rename | ( | KName & | pName | ) | [virtual] |
Rename a name if necessary.
pName | The name to be renamed. |
true
on success, false
otherwise.Implements KRenamingStrategy.
virtual void Clear | ( | ) | [virtual] |
Resets internal state regarding assigned names.
Implements KRenamingStrategy.
virtual KRenamingStrategy* Clone | ( | ) | [virtual] |
Create a dynamic renaming strategy instance of the same type as the child class.
Implements KRenamingStrategy.
void SetClashSoverType | ( | EClashType | pType | ) |
static char* NoPrefixName | ( | char const * | pName | ) | [static] |
Returns a name with its prefix removed.
pName | A name containing a prefix. |
static char* NoPrefixName | ( | KString & | pName | ) | [static] |
Returns a name with its prefix removed.
pName | A name containing a prefix. |
virtual char* GetNameSpace | ( | ) | [inline, virtual] |
Get the namespace of the last renamed object.
Definition at line 142 of file kfbxrenamingstrategy.h.
{ return mNameSpace.Buffer(); }
virtual void SetInNameSpaceSymbol | ( | KString | pNameSpaceSymbol | ) | [inline, virtual] |
Sets the current scene namespace symbol.
pNameSpaceSymbol | namespace symbol. |
Definition at line 147 of file kfbxrenamingstrategy.h.
{mInNameSpaceSymbol = pNameSpaceSymbol;}
virtual void SetOutNameSpaceSymbol | ( | KString | pNameSpaceSymbol | ) | [inline, virtual] |
Sets the wanted scene namespace symbol.
pNameSpaceSymbol | namespace symbol. |
Definition at line 152 of file kfbxrenamingstrategy.h.
{mOutNameSpaceSymbol = pNameSpaceSymbol;}
virtual void SetCaseSensibility | ( | bool | pIsCaseSensitive | ) | [inline, virtual] |
Sets case sensitivity for name clashing.
pIsCaseSensitive | Set to true to make the name clashing case
sensitive. |
Definition at line 157 of file kfbxrenamingstrategy.h.
{mCaseSensitive = pIsCaseSensitive ;}
virtual void SetReplaceNonAlphaNum | ( | bool | pReplaceNonAlphaNum | ) | [inline, virtual] |
Sets the flag for character acceptance during renaming.
pReplaceNonAlphaNum | Set to true to replace illegal characters with an
underscore ("_"). |
Definition at line 162 of file kfbxrenamingstrategy.h.
{mReplaceNonAlphaNum = pReplaceNonAlphaNum;}
virtual void SetFirstNotNum | ( | bool | pFirstNotNum | ) | [inline, virtual] |
Sets the flag for first character acceptance during renaming.
pFirstNotNum | Set to true to add an underscore to the name if
the first character is a number. |
Definition at line 167 of file kfbxrenamingstrategy.h.
{mFirstNotNum = pFirstNotNum;}
virtual bool RenameUnparentNameSpace | ( | KFbxNode * | pNode, |
bool | pIsRoot =
false |
||
) | [virtual] |
Recursively renames all the unparented namespaced objects (Prefix mode) starting from this node.
pNode | Parent node. |
pIsRoot | The root node. |
virtual bool RemoveImportNameSpaceClash | ( | KFbxNode * | pNode | ) | [virtual] |
Recursively removes all the unparented namespaced "key" starting from this node.
pNode | Parent node. |
virtual void GetParentsNameSpaceList | ( | KFbxNode * | pNode, |
KArrayTemplate< KString * > & | pNameSpaceList | ||
) | [virtual] |
virtual bool RenameToFBX | ( | KName & | pName | ) | [protected, virtual] |
virtual bool RenameFromFBX | ( | KName & | pName | ) | [protected, virtual] |
Definition at line 191 of file kfbxrenamingstrategy.h.
EClashType
mType [protected] |
Definition at line 192 of file kfbxrenamingstrategy.h.
KCharPtrSet
mStringNameArray [protected] |
Definition at line 207 of file kfbxrenamingstrategy.h.
KArrayTemplate<NameCell*>
mExistingNsList [protected] |
Definition at line 208 of file kfbxrenamingstrategy.h.
bool
mOnCreationRun [protected] |
Definition at line 209 of file kfbxrenamingstrategy.h.
bool
mCaseSensitive [protected] |
Definition at line 210 of file kfbxrenamingstrategy.h.
bool
mReplaceNonAlphaNum [protected] |
Definition at line 211 of file kfbxrenamingstrategy.h.
bool
mFirstNotNum [protected] |
Definition at line 212 of file kfbxrenamingstrategy.h.
KString
mNameSpace [protected] |
Definition at line 213 of file kfbxrenamingstrategy.h.
KString
mInNameSpaceSymbol [protected] |
Definition at line 214 of file kfbxrenamingstrategy.h.
KString
mOutNameSpaceSymbol [protected] |
Definition at line 215 of file kfbxrenamingstrategy.h.