KFbxRenamingStrategy
#include<kfbxrenamingstrategy.h>

Inheritance diagram for KFbxRenamingStrategy:

Inheritance graph
[legend]

List of all members.

Detailed Description

This class contains the description of the FBX renaming strategy.

TheKFbxRenamingStrategyobject can be setup to rename all the objects in a scene. It can remove nameclashing, remove illegal characters, manage namespaces, and manage backward compatibility.

Definition at line61of filekfbxrenamingstrategy.h.


Public Types

enum EMode
 
  • eTO_FBX
    • eFROM_FBX
    • eMODE_COUNT
More...
enum EClashType
 
  • eNAMECLASH_AUTO
    • eNAMECLASH_TYPE1
    • eNAMECLASH_TYPE2
More...

Public Member Functions

 KFbxRenamingStrategy(EModepMod, bool pOnCreationRun=false)
 Constructor.
virtual ~KFbxRenamingStrategy()
 Destructor.
void SetClashSoverType(EClashTypepType)
 Setup the strategy to perform this algorithm.
virtual bool Rename(KName&pName)
 Rename.
virtual void Clear()
 Empty all memories about given names.
virtualKRenamingStrategyClone()
 Spawn mechanism.
virtual char * GetNameSpace()
 Get the namespace of the last renamed object.
virtual void SetInNameSpaceSymbol(KStringpNameSpaceSymbol)
 Sets the current scene namespace symbol.
virtual void SetOutNameSpaceSymbol(KStringpNameSpaceSymbol)
 Sets the wanted scene namespace symbol.
virtual void SetCaseSensibility(bool pIsCaseSensitive)
 Sets case sensitivity for nameclashing.
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)
 Recusively renames all the unparented namespaced objects (Prefix mode) starting from this node.
virtual bool RemoveImportNameSpaceClash(KFbxNode*pNode)
 Recusively removes all the unparented namespaced "key" starting from this node.

Static Public Member Functions

static char * NoPrefixName(char const *pName)
 Returns a name with its prefix removed.

Member Enumeration Documentation

enumEMode

  • eTO_FBX
    • eFROM_FBX
    • eMODE_COUNT

Definition at line70of filekfbxrenamingstrategy.h.

  • eNAMECLASH_AUTO
    • eNAMECLASH_TYPE1
    • eNAMECLASH_TYPE2

Definition at line82of filekfbxrenamingstrategy.h.

Constructor&Destructor Documentation

KFbxRenamingStrategy(EMode pMod,
bool pOnCreationRun=false 
)

Constructor.

Parameters:
pMod 
pOnCreationRun 

virtual ~KFbxRenamingStrategy( ) [virtual]

Destructor.

Member Function Documentation

void SetClashSoverType(EClashType pType ) 

Setup the strategy to perform this algorithm.

Parameters:
pType 

virtual bool Rename(KNamepName ) [virtual]

Rename.

Parameters:
pName New name.
Returns:
trueif successful,falseotherwise.

ImplementsKRenamingStrategy.

virtual void Clear( ) [virtual]

Empty all memories about given names.

ImplementsKRenamingStrategy.

virtualKRenamingStrategy* Clone( ) [virtual]

Spawn mechanism.

Create a dynamic renaming strategy instance of the same type.

Returns:
newKRenamingStrategy

ImplementsKRenamingStrategy.

static char* NoPrefixName(char const * pName ) [static]

Returns a name with its prefix removed.

Parameters:
pName A name containning a prefix.
Returns:
The part of pName following the "::"

virtual char* GetNameSpace( ) [inline, virtual]

Get the namespace of the last renamed object.

Returns:
Char pointer to the namespace.

Definition at line129of filekfbxrenamingstrategy.h.

virtual void SetInNameSpaceSymbol(KString pNameSpaceSymbol ) [inline, virtual]

Sets the current scene namespace symbol.

Parameters:
pNameSpaceSymbol namespace symbol.

Definition at line134of filekfbxrenamingstrategy.h.

virtual void SetOutNameSpaceSymbol(KString pNameSpaceSymbol ) [inline, virtual]

Sets the wanted scene namespace symbol.

Parameters:
pNameSpaceSymbol namespace symbol.

Definition at line139of filekfbxrenamingstrategy.h.

virtual void SetCaseSensibility(bool pIsCaseSensitive ) [inline, virtual]

Sets case sensitivity for nameclashing.

Parameters:
pIsCaseSensitive Set totrueto make the nameclashing case sensitive.

Definition at line144of filekfbxrenamingstrategy.h.

virtual void SetReplaceNonAlphaNum(bool pReplaceNonAlphaNum ) [inline, virtual]

Sets the flag for character acceptance during renaming.

Parameters:
pReplaceNonAlphaNum Set totrueto replace illegal characters with an underscore ("_").

Definition at line149of filekfbxrenamingstrategy.h.

virtual void SetFirstNotNum(bool pFirstNotNum ) [inline, virtual]

Sets the flag for first character acceptance during renaming.

Parameters:
pFirstNotNum Set totrueto add an underscore to the name if the first character is a number.

Definition at line154of filekfbxrenamingstrategy.h.

virtual bool RenameUnparentNameSpace(KFbxNodepNode,
bool pIsRoot=false 
)[virtual]

Recusively renames all the unparented namespaced objects (Prefix mode) starting from this node.

Parameters:
pNode Parent node.
pIsRoot The root node.
Remarks:
This function adds "_NSclash" when it encounters an unparented namespaced object.

virtual bool RemoveImportNameSpaceClash(KFbxNodepNode ) [virtual]

Recusively removes all the unparented namespaced "key" starting from this node.

Parameters:
pNode Parent node.
Remarks:
This function removes "_NSclash" when encountered. This is the opposite from RenameUnparentNameSpace.