#include <kfbxscene.h>
Inherits KFbxObject.
Inheritance diagram for KFbxScene:
The FBX SDK requires unique names for nodes, textures, materials, generic nodes, videos and gobos contained in a given scene. To build a valid node tree, new nodes must be inserted under the scene's root node.
This class also provides access to global settings and take information.
Definition at line 94 of file kfbxscene.h.
Error Management | |
The same error object is shared among instances of this class. | |
enum | EError |
Error identifiers. More... | |
KError & | GetError () |
Retrieve error object. | |
EError | GetLastErrorID () |
Get last error code. | |
char * | GetLastErrorString () |
Get last error string. | |
Node Tree Access | |
KFbxNode * | GetRootNode () |
Get the root node. | |
KFbxNode * | GetCameraSwitcher () |
Get the camera switcher node. | |
void | FillNodeArray (KArrayTemplate< KFbxNode * > &pNodeArray, KFbxNodeAttribute::EAttributeType pAttributeType, bool pDepthFirst=false) |
Fill a node array will all existing node with a given node attribute type. | |
Texture Material and Video Access | |
void | FillTextureArray (KArrayTemplate< KFbxTexture * > &pTextureArray) |
Clear then fill a texture array with all existing textures included in the scene. | |
void | FillMaterialArray (KArrayTemplate< KFbxSurfaceMaterial * > &pMaterialArray) |
Clear then fill a material array with all existing materials included in the scene. | |
Generic Node Access | |
int | GetGenericNodeCount () |
Get number of generic nodes. | |
KFbxGenericNode * | GetGenericNode (int pIndex) |
Get generic node at given index. | |
KFbxGenericNode * | GetGenericNode (char *pName) |
Access a generic node from its name. | |
bool | AddGenericNode (KFbxGenericNode *pGenericNode) |
Add the generic node to this scene. | |
bool | RemoveGenericNode (KFbxGenericNode *pGenericNode) |
Remove the generic node from this scene. | |
Character Management | |
int | GetCharacterCount () |
Get number of characters. | |
KFbxCharacter * | GetCharacter (int pIndex) |
Get character at given index. | |
int | CreateCharacter (char *pName) |
Create a new character. | |
void | DestroyCharacter (int pIndex) |
Destroy character. | |
ControlSetPlug Management | |
int | GetControlSetPlugCount () |
Get number of ControlSetPlugs. | |
KFbxControlSetPlug * | GetControlSetPlug (int pIndex) |
Get ControlSetPlug at given index. | |
int | CreateControlSetPlug (char *pName) |
Create a new ControlSetPlug. | |
void | DestroyControlSetPlug (int pIndex) |
Destroy ControlSetPlug. | |
Character Pose Management | |
int | GetCharacterPoseCount () |
Get number of character poses. | |
KFbxCharacterPose * | GetCharacterPose (int pIndex) |
Get character pose at given index. | |
int | CreateCharacterPose (char *pName) |
Create a new character pose. | |
void | DestroyCharacterPose (int pIndex) |
Destroy character pose. | |
Pose Management | |
int | GetPoseCount () |
Get number of poses. | |
KFbxPose * | GetPose (int pIndex) |
Get pose at given index. | |
bool | AddPose (KFbxPose *pPose) |
Add a pose to this scene. | |
bool | RemovePose (KFbxPose *pPose) |
Remove the specified pose from the scene. | |
bool | RemovePose (int pIndex) |
Remove the pose at the given index from the scene. | |
Scene information | |
KFbxSceneInfo * | GetSceneInfo () |
Get the scene information. | |
void | SetSceneInfo (KFbxSceneInfo *pSceneInfo) |
Set the scene information. | |
Global Settings | |
KFbxGlobalLightSettings & | GetGlobalLightSettings () |
Access global light settings. | |
KFbxGlobalCameraSettings & | GetGlobalCameraSettings () |
Access global camera settings. | |
KFbxGlobalTimeSettings & | GetGlobalTimeSettings () |
Access global time settings. | |
KFbxGlobalSettings & | GetGlobalSettings () |
Access global settings. | |
const KFbxGlobalSettings & | GetGlobalSettings () const |
Const access to global settings. | |
Take Management | |
bool | CreateTake (char *pName) |
Create a take. | |
bool | RemoveTake (char *pName) |
Remove a take. | |
bool | SetCurrentTake (char *pName) |
Set the current take. | |
char * | GetCurrentTakeName () |
Get current take name. | |
void | FillTakeNameArray (KArrayTemplate< KString * > &pNameArray) |
Fill a string array with all existing take names. | |
Take Information Management | |
bool | SetTakeInfo (const KFbxTakeInfo &pTakeInfo) |
Set take information about an available take. | |
KFbxTakeInfo * | GetTakeInfo (const KString &pTakeName) |
Get take information about an available take. | |
Public Member Functions | |
void | Clear () |
Delete the node tree below the root node and restore default settings. |
enum EError |
Error identifiers.
Most of these are only used internally.
Definition at line 492 of file kfbxscene.h.
void Clear | ( | ) |
Delete the node tree below the root node and restore default settings.
KFbxNode* GetRootNode | ( | ) |
Get the root node.
KFbxNode* GetCameraSwitcher | ( | ) |
Get the camera switcher node.
KFbxNodeAttribute::eCAMERA_SWITCHER
. This node isn't saved if the scene contains no camera. Nodes inserted below are never saved.Use function KFbxTakeNode::GetCameraIndex() to get and set the camera index. If a camera is added or removed after camera indices have been set, the camera indices must be updated. It's much simpler to set the camera indices once all cameras have been set.
Camera index keys must be set with constant interpolation to make sure camera switches occur exaclty at key time.
void FillNodeArray | ( | KArrayTemplate< KFbxNode * > & | pNodeArray, | |
KFbxNodeAttribute::EAttributeType | pAttributeType, | |||
bool | pDepthFirst = false | |||
) |
Fill a node array will all existing node with a given node attribute type.
pNodeArray | An array of pointers to KFbxNode objects. | |
pAttributeType | Node attribute type searched. | |
pDepthFirst | If true , the node tree is scanned depth first. |
void FillTextureArray | ( | KArrayTemplate< KFbxTexture * > & | pTextureArray | ) |
Clear then fill a texture array with all existing textures included in the scene.
pTextureArray | An array of texture pointers. |
void FillMaterialArray | ( | KArrayTemplate< KFbxSurfaceMaterial * > & | pMaterialArray | ) |
Clear then fill a material array with all existing materials included in the scene.
pMaterialArray | An array of material pointers. |
int GetGenericNodeCount | ( | ) |
Get number of generic nodes.
KFbxGenericNode* GetGenericNode | ( | int | pIndex | ) |
Get generic node at given index.
pIndex | Position in the list of the generic nodes. |
NULL
if the index is out of bounds. KFbxGenericNode* GetGenericNode | ( | char * | pName | ) |
Access a generic node from its name.
pName |
bool AddGenericNode | ( | KFbxGenericNode * | pGenericNode | ) |
Add the generic node to this scene.
pGenericNode | Pointer to the generic node to be added. |
NULL
, this method will return false
otherwise true
. bool RemoveGenericNode | ( | KFbxGenericNode * | pGenericNode | ) |
Remove the generic node from this scene.
pGenericNode | Pointer to the generic node to be removed. |
NULL
, this method will return false
otherwise true
. int GetCharacterCount | ( | ) |
Get number of characters.
KFbxCharacter* GetCharacter | ( | int | pIndex | ) |
Get character at given index.
pIndex | Position in the list of the characters. |
NULL
if index is out of bounds. int CreateCharacter | ( | char * | pName | ) |
Create a new character.
pName | Name given to character. |
void DestroyCharacter | ( | int | pIndex | ) |
Destroy character.
pIndex | Specify which character to destroy. |
int GetControlSetPlugCount | ( | ) |
Get number of ControlSetPlugs.
KFbxControlSetPlug* GetControlSetPlug | ( | int | pIndex | ) |
Get ControlSetPlug at given index.
pIndex | Position in the list of the ControlSetPlug |
NULL
if index is out of bounds. int CreateControlSetPlug | ( | char * | pName | ) |
Create a new ControlSetPlug.
pName | Name given to ControlSetPlug. |
void DestroyControlSetPlug | ( | int | pIndex | ) |
Destroy ControlSetPlug.
pIndex | Specify which ControlSetPlug to destroy. |
int GetCharacterPoseCount | ( | ) |
Get number of character poses.
KFbxCharacterPose* GetCharacterPose | ( | int | pIndex | ) |
Get character pose at given index.
pIndex | Position in the list of character poses. |
NULL
if index is out of bounds. int CreateCharacterPose | ( | char * | pName | ) |
Create a new character pose.
pName | Name given to character pose. |
void DestroyCharacterPose | ( | int | pIndex | ) |
Destroy character pose.
pIndex | Specify which character pose to destroy. |
int GetPoseCount | ( | ) |
Get number of poses.
KFbxPose* GetPose | ( | int | pIndex | ) |
Get pose at given index.
pIndex | Position in the list of poses. |
NULL
if index is out of bounds. bool AddPose | ( | KFbxPose * | pPose | ) |
Add a pose to this scene.
pPose | The pose to be added to the scene. |
false
. bool RemovePose | ( | KFbxPose * | pPose | ) |
Remove the specified pose from the scene.
pPose | The pose to be removed from the scene. |
true
otherwise, if the pose could not be found returns false
. bool RemovePose | ( | int | pIndex | ) |
Remove the pose at the given index from the scene.
pIndex | The zero-based index of the pose to be removed. |
true
otherwise, if the pose could not be found returns false
. KFbxSceneInfo* GetSceneInfo | ( | ) |
Get the scene information.
void SetSceneInfo | ( | KFbxSceneInfo * | pSceneInfo | ) |
Set the scene information.
pSceneInfo | Pointer to the scene information object. |
KFbxGlobalLightSettings& GetGlobalLightSettings | ( | ) |
Access global light settings.
KFbxGlobalCameraSettings& GetGlobalCameraSettings | ( | ) |
Access global camera settings.
KFbxGlobalTimeSettings& GetGlobalTimeSettings | ( | ) |
Access global time settings.
KFbxGlobalSettings& GetGlobalSettings | ( | ) |
Access global settings.
const KFbxGlobalSettings& GetGlobalSettings | ( | ) | const |
Const access to global settings.
bool CreateTake | ( | char * | pName | ) |
Create a take.
pName | Created take name. |
true
if not a single node, texture or material in the hierarchy had a take with this name before.
false
if at least one node, texture or material in the hierarchy had a take with this name before.
In the last case, KFbxScene::GetLastErrorID() will return eTAKE_ERROR
.
bool RemoveTake | ( | char * | pName | ) |
Remove a take.
pName | Name of the take to remove. |
true
if every node, texture and material in the hierarchy have a take with this name.
false
if at least one node, texture or material in the hierarchy don't have a take with this name.
In the last case, KFbxScene::GetLastErrorID() will return eTAKE_ERROR
.
bool SetCurrentTake | ( | char * | pName | ) |
Set the current take.
pName | Name of the take to set. |
true
if every node, texture and material in the hierarchy have a take with this name.
false
if at least one node, texture or material in the hierarchy don't have a take with this name.
In the last case, KFbxScene::GetLastErrorID() will return eTAKE_ERROR
.
All nodes, textures and materials without a take node of the requested name are set to default take node. It means that, if a node, texture or material does not have the requested take, it is assumed that this node is not animated in this take.
char* GetCurrentTakeName | ( | ) |
Get current take name.
An empty string if the scene has not been imported from a file and function KFbxScene::SetCurrentTake() has not been called previously at least once.
void FillTakeNameArray | ( | KArrayTemplate< KString * > & | pNameArray | ) |
Fill a string array with all existing take names.
pNameArray | An array of string objects. |
The array of string is cleared before scanning the node hierarchy.
bool SetTakeInfo | ( | const KFbxTakeInfo & | pTakeInfo | ) |
Set take information about an available take.
pTakeInfo | Take information, field KFbxTakeInfo::mName specifies the targeted take. |
true
if take is found and take information set. KFbxTakeInfo* GetTakeInfo | ( | const KString & | pTakeName | ) |
Get take information about an available take.
pTakeName | Take name. |
NULL
if take isn't found or has no information set. KError& GetError | ( | ) |
Retrieve error object.
EError GetLastErrorID | ( | ) |
Get last error code.
char* GetLastErrorString | ( | ) |
Get last error string.