This reference page is linked to from the following overview topics: FBX SDK 2012, Supported Scene Elements, Information and Technical Support, Your First FBX SDK Program, Importing a Scene, Exporting a Scene, Managing Memory with the FBX SDK Manager, FBX Objects, FBX Properties, Connections, FBX Scenes, Merging Two Scenes, FBX Nodes, Transformation Data, Lights, Animation classes and their interrelationships, List of Python FBX classes.
This class contains the description of a 3D scene.
It contains the nodes (including the root node) (KFbxNode), materials, textures, videos, gobos, poses, characters, character poses, control set plugs, generic nodes, scene information, global settings, and a global evaluator. The nodes are structured in a tree under the scene's root node.
When an object is created using the FBX SDK, a scene is usually passed as argument to the object creation function to specify that the object belongs to this scene. At this point, a connection is made with the object as source and the scene as destination.
All objects in the scene can be queried by connection index. In addition, generic nodes, materials, and textures can also be queried by name. In this latter case, the first object with the queried name will be returned.
The global evaluator (KFbxAnimEvaluator) is used to compute animation values for animated scenes.
Animation/main.cxx, Common/AnimationUtility.cxx, Common/AnimationUtility.h, Common/Common.cxx, Common/Common.h, Common/GeometryUtility.cxx, Common/GeometryUtility.h, ConvertScene/main.cxx, ExportScene01/main.cxx, ExportScene02/main.cxx, ExportScene03/main.cxx, ExportScene04/main.cxx, ExportScene05/main.cxx, ImportScene/DisplayAnimation.cxx, ImportScene/DisplayGenericInfo.cxx, ImportScene/DisplayHierarchy.cxx, ImportScene/DisplayPose.cxx, ImportScene/main.cxx, Instances/main.cxx, Layers/main.cxx, MyOwnWriterReader/MyOwnReader.cxx, MyOwnWriterReader/MyOwnWriter.cxx, MyOwnWriterReader/MyOwnWriter.h, Normals/main.cxx, Pivot/main.cxx, ProceduralTexture/main.cxx, StereoCamera/main.cxx, SwitchBinding/main.cxx, Transformations/main.cxx, UIExamples/Common/ImportExport.cxx, UIExamples/Common/ImportExport.h, UIExamples/CubeCreator/SDK_Utility.cxx, UIExamples/CubeCreator/SDK_Utility.h, UIExamples/CubeCreator/UI.cxx, UIExamples/SceneTreeView/SDK_Utility.cxx, UIExamples/SceneTreeView/SDK_Utility.h, UIExamples/SceneTreeView/UI.cxx, UserProperties/main.cxx, UVSample/main.cxx, ViewScene/DrawScene.cxx, ViewScene/DrawScene.h, ViewScene/InitScene.cxx, ViewScene/InitScene.h, ViewScene/main.cxx, ViewScene/SetCamera.cxx, ViewScene/SetCamera.h, ViewScene/Texture.cxx, and ViewScene/Texture.h.
Definition at line 82 of file kfbxscene.h.
#include <kfbxscene.h>
Public Member Functions |
|
K_DEPRECATED void | FillNodeArray (KArrayTemplate< KFbxNode * > &pNodeArray) |
void | FillPoseArray (KArrayTemplate< KFbxPose * > &pPoseArray) |
Clear then fill a pose array with all
existing pose included in the scene. |
|
virtual KFbxObject & | Copy (const KFbxObject &pObject) |
Copy an object content into this object.
|
|
void | ConnectMaterials () |
void | BuildMaterialLayersDirectArray () |
void | ReindexMaterialConnections () |
KSet * | AddTakeTimeWarpSet (char *pTakeName) |
KSet * | GetTakeTimeWarpSet (char *pTakeName) |
void | ForceKill () |
void | ConvertNurbsSurfaceToNurb () |
void | ConvertMeshNormals () |
void | ConvertNurbCurvesToNulls () |
void | ConnectTextures () |
void | BuildTextureLayersDirectArray () |
void | FixInheritType (KFbxNode *pNode) |
void | UpdateScaleCompensate (KFbxNode *pNode, KFbxIOSettings &pIOS) |
Recursively convert transform inherit type
from eINHERIT_Rrs to eINHERIT_RSrs by compensating object scale.
|
|
kFbxClassId | ConvertAttributeTypeToClassID (KFbxNodeAttribute::EAttributeType pAttributeType) |
KFbxGlobalLightSettings & | GlobalLightSettings () |
Internally used by the FBX version 6.x and
earlier readers/writers. |
|
KFbxGlobalCameraSettings & | GlobalCameraSettings () |
Internally used by the FBX version 6.x and
earlier readers/writers. |
|
KFbxGlobalTimeSettings & | GlobalTimeSettings () |
Internally used by the FBX version 6.x and
earlier readers/writers. |
|
Friends |
|
class | KFbxLayerContainer |
class | KFbxNodeFinderDuplicateName |
Clear scene |
|
void | Clear () |
Delete the node tree below the root node and
restore default settings. |
|
Node Tree Access |
|
KFbxNode * | GetRootNode () const |
Get the root node of the scene. |
|
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 () const |
Get number of generic nodes in the scene.
|
|
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 a generic node to this scene. |
|
bool | RemoveGenericNode (KFbxGenericNode *pGenericNode) |
Remove the generic node from this scene.
|
|
Character Management |
|
int | GetCharacterCount () const |
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 () const |
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 () const |
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 () const |
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 |
|
KFbxDocumentInfo * | GetSceneInfo () |
Get the scene information. |
|
void | SetSceneInfo (KFbxDocumentInfo *pSceneInfo) |
Set the scene information. |
|
Global Settings |
|
KFbxGlobalSettings & | GetGlobalSettings () |
Access global settings. |
|
const KFbxGlobalSettings & | GetGlobalSettings () const |
Const access to global settings. |
|
Global Evaluator |
|
The global evaluator is
used to compute animation values for animated scenes.A typical
usage would be to compute the global transform matrix of a node
lNode at a given time lTime .
KFbxXMatrix& lGlobalMatrix = lNode->GetScene()->GetEvaluator()->GetNodeGlobalTransform(lNode, lTime); or the exact equivalent: KFbxXMatrix& lGlobalMatrix = lNode->EvaluateGlobalTransform(lTime); |
|
void | SetEvaluator (KFbxAnimEvaluator *pEvaluator) |
Set the global evaluator used by this scene
evaluation engine. |
|
KFbxAnimEvaluator * | GetEvaluator () |
Get the global evaluator used by this scene
evaluation engine. |
|
Material Access |
|
int | GetMaterialCount () const |
Get number of materials. |
|
KFbxSurfaceMaterial * | GetMaterial (int pIndex) |
Get the material at the given index.
|
|
KFbxSurfaceMaterial * | GetMaterial (char *pName) |
Get the material by its name. |
|
bool | AddMaterial (KFbxSurfaceMaterial *pMaterial) |
Add the material to this scene. |
|
bool | RemoveMaterial (KFbxSurfaceMaterial *pMaterial) |
Remove the material from this scene.
|
|
Texture Access |
|
int | GetTextureCount () const |
Get number of textures (type
KFbxTexture). |
|
KFbxTexture * | GetTexture (int pIndex) |
Get the texture at the given index. |
|
KFbxTexture * | GetTexture (char *pName) |
Get the texture by its name. |
|
bool | AddTexture (KFbxTexture *pTexture) |
Add the texture to this scene. |
|
bool | RemoveTexture (KFbxTexture *pTexture) |
Remove the texture from this scene. |
|
Node Access |
|
int | GetNodeCount () const |
Get number of nodes. |
|
KFbxNode * | GetNode (int pIndex) |
Get the node at the given index. |
|
bool | AddNode (KFbxNode *pNode) |
Add the node to this scene. |
|
bool | RemoveNode (KFbxNode *pNode) |
Remove the node from this scene. |
|
int | GetCurveOnSurfaceCount () |
Helper method for determining the number of
nodes that have curves on surface attributes in the scene. |
|
KFbxNode * | FindNodeByName (const KString &pName) |
Get the first node with this name. |
|
Geometry Access |
|
int | GetGeometryCount () const |
Get number of geometries. |
|
KFbxGeometry * | GetGeometry (int pIndex) |
Get the geometry at the given index.
|
|
bool | AddGeometry (KFbxGeometry *pGeometry) |
Add the geometry to this scene. |
|
bool | RemoveGeometry (KFbxGeometry *pGeometry) |
Remove the geometry from this scene.
|
|
Video Access |
|
int | GetVideoCount () const |
Get number of videos. |
|
KFbxVideo * | GetVideo (int pIndex) |
Get the video at the given index. |
|
bool | AddVideo (KFbxVideo *pVideo) |
Add the video to this scene. |
|
bool | RemoveVideo (KFbxVideo *pVideo) |
Remove the video from this scene. |
|
Utilities |
|
void | SyncShowPropertyForInstance () |
Synchronize all the Show properties of node
instances. |
void Clear | ( | ) | [virtual] |
Delete the node tree below the root node and restore default settings.
Reimplemented from KFbxDocument.
KFbxNode* GetRootNode | ( | ) | const |
Get the root node of the scene.
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 | ( | ) | const |
Get number of generic nodes in the scene.
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 | Name of the generic node. |
bool AddGenericNode | ( | KFbxGenericNode * | pGenericNode | ) |
Add a 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 | ( | ) | const |
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 | ( | ) | const |
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 | ( | ) | const |
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 | ( | ) | const |
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 (for example: bind pose, rest pose) to be added to the scene. |
true
. Otherwise, if the pose is already in the scene,
return false
.bool RemovePose | ( | KFbxPose * | pPose | ) |
Remove the specified pose from the scene.
pPose | The pose (for example: bind pose, rest pose) to be removed from the scene. |
true
. Otherwise, if the pose could not be found return
false
.bool RemovePose | ( | int | pIndex | ) |
Remove the pose at the given index from the scene.
pIndex | Index of the pose to be removed. |
true
. Otherwise, if the pose could not be found return
false
.KFbxDocumentInfo* GetSceneInfo | ( | ) | [inline] |
Get the scene information.
Definition at line 300 of file kfbxscene.h.
{ return GetDocumentInfo(); }
void SetSceneInfo | ( | KFbxDocumentInfo * | pSceneInfo | ) | [inline] |
Set the scene information.
pSceneInfo | Pointer to the scene information object. |
Definition at line 305 of file kfbxscene.h.
{ SetDocumentInfo(pSceneInfo); }
KFbxGlobalSettings& GetGlobalSettings | ( | ) |
Access global settings.
const KFbxGlobalSettings& GetGlobalSettings | ( | ) | const |
Const access to global settings.
void SetEvaluator | ( | KFbxAnimEvaluator * | pEvaluator | ) |
Set the global evaluator used by this scene evaluation engine.
pEvaluator | The evaluator to be used for evaluation processing of this scene. |
KFbxAnimEvaluator* GetEvaluator | ( | ) |
Get the global evaluator used by this scene evaluation engine.
If no evaluator were previously set, this function will return either the first evaluator found attached to this scene, or a new default evaluator.
K_DEPRECATED void FillNodeArray | ( | KArrayTemplate< KFbxNode * > & | pNodeArray | ) |
pNodeArray | An array of node pointers. |
void FillPoseArray | ( | KArrayTemplate< KFbxPose * > & | pPoseArray | ) |
Clear then fill a pose array with all existing pose included in the scene.
pPoseArray | An array of pose pointers. |
int GetMaterialCount | ( | ) | const |
KFbxSurfaceMaterial* GetMaterial | ( | int | pIndex | ) |
Get the material at the given index.
pIndex | Position in the list of materials. |
NULL
if the index is
out of bounds.KFbxSurfaceMaterial* GetMaterial | ( | char * | pName | ) |
Get the material by its name.
pName | Name of the material. |
NULL
if not found.bool AddMaterial | ( | KFbxSurfaceMaterial * | pMaterial | ) |
Add the material to this scene.
pMaterial | Pointer to the material to be added. |
bool RemoveMaterial | ( | KFbxSurfaceMaterial * | pMaterial | ) |
Remove the material from this scene.
pMaterial | Pointer to the material to be removed. |
int GetTextureCount | ( | ) | const |
Get number of textures (type KFbxTexture).
int lNbFileTextures = lScene->GetSrcObjectCount(FBX_TYPE(KFbxFileTexture)); int lNbLayeredTextures = lScene->GetSrcObjectCount(FBX_TYPE(KFbxLayeredTexture)); int lNbProceduralTextures = lScene->GetSrcObjectCount(FBX_TYPE(KFbxProceduralTexture));
KFbxTexture* GetTexture | ( | int | pIndex | ) |
Get the texture at the given index.
pIndex must be between 0 and GetTextureCount().
pIndex | Position in the list of textures. |
NULL
if the index is out
of bounds.KFbxFileTexture* lFileTexture = lScene->GetSrcObject(FBX_TYPE(KFbxFileTexture), i); KFbxLayeredTexture* lLayeredTexture = lScene->GetSrcObject(FBX_TYPE(KFbxLayeredTexture), i); KFbxProceduralTexture* lProceduralTexture = lScene->GetSrcObject(FBX_TYPE(KFbxProceduralTexture), i);
KFbxTexture* GetTexture | ( | char * | pName | ) |
Get the texture by its name.
pName | Name of the texture. |
NULL
if not found.bool AddTexture | ( | KFbxTexture * | pTexture | ) |
Add the texture to this scene.
pTexture | Pointer to the texture to be added. |
true
on successful addition.bool RemoveTexture | ( | KFbxTexture * | pTexture | ) |
Remove the texture from this scene.
pTexture | Pointer to the texture to be removed. |
true
on successful removal.int GetNodeCount | ( | ) | const |
Get number of nodes.
KFbxNode* GetNode | ( | int | pIndex | ) |
Get the node at the given index.
pIndex | Position in the list of nodes. |
NULL
if the index is out of
bounds.bool AddNode | ( | KFbxNode * | pNode | ) |
Add the node to this scene.
pNode | Pointer to the node to be added. |
bool RemoveNode | ( | KFbxNode * | pNode | ) |
Remove the node from this scene.
pNode | Pointer to the node to be removed. |
int GetCurveOnSurfaceCount | ( | ) |
Helper method for determining the number of nodes that have curves on surface attributes in the scene.
Since the curve-on-surface nodes are connected to nurbs geometry and not any KFbxNodes in the scene, they won't normally be picked up in a graph traversal.
Get the first node with this name.
pName | Name of the node. |
NULL
if node is not
found.int GetGeometryCount | ( | ) | const |
KFbxGeometry* GetGeometry | ( | int | pIndex | ) |
Get the geometry at the given index.
pIndex | Position in the list of geometries. |
NULL
if the index is
out of bounds.bool AddGeometry | ( | KFbxGeometry * | pGeometry | ) |
Add the geometry to this scene.
pGeometry | Pointer to the geometry to be added. |
bool RemoveGeometry | ( | KFbxGeometry * | pGeometry | ) |
Remove the geometry from this scene.
pGeometry | Pointer to the geometry to be removed. |
int GetVideoCount | ( | ) | const |
KFbxVideo* GetVideo | ( | int | pIndex | ) |
Get the video at the given index.
pIndex | Position in the list of videos. |
NULL
if the index is out
of bounds.bool AddVideo | ( | KFbxVideo * | pVideo | ) |
Add the video to this scene.
pVideo | Pointer to the video to be added. |
bool RemoveVideo | ( | KFbxVideo * | pVideo | ) |
Remove the video from this scene.
pVideo | Pointer to the video to be removed. |
void SyncShowPropertyForInstance | ( | ) |
Synchronize all the Show properties of node instances.
Walks all the node attributes defined in the scene and synchronize the Show property of all the nodes that reference the node attribute so that they all contain the same value. This method should be called after the FBX scene is completely created (typically right after the calls to the KFbxImporter::Import() or just before the calls to the KFbxExporter::Export().
virtual KFbxObject& Copy | ( | const KFbxObject & | pObject | ) | [virtual] |
Copy an object content into this object.
pObject | The source object to copy data from. |
Reimplemented from KFbxDocument.
void ConnectMaterials | ( | ) |
void BuildMaterialLayersDirectArray | ( | ) |
void ReindexMaterialConnections | ( | ) |
KSet* AddTakeTimeWarpSet | ( | char * | pTakeName | ) |
KSet* GetTakeTimeWarpSet | ( | char * | pTakeName | ) |
void ForceKill | ( | ) |
void ConvertNurbsSurfaceToNurb | ( | ) |
void ConvertMeshNormals | ( | ) |
void ConvertNurbCurvesToNulls | ( | ) |
void ConnectTextures | ( | ) |
void BuildTextureLayersDirectArray | ( | ) |
void FixInheritType | ( | KFbxNode * | pNode | ) |
void UpdateScaleCompensate | ( | KFbxNode * | pNode, |
KFbxIOSettings & | pIOS | ||
) |
Recursively convert transform inherit type from eINHERIT_Rrs to eINHERIT_RSrs by compensating object scale.
pNode | Root node. Conversion will traverse its children recursively. |
pIOS | The IO options. |
kFbxClassId ConvertAttributeTypeToClassID | ( | KFbxNodeAttribute::EAttributeType | pAttributeType | ) |
KFbxGlobalLightSettings& GlobalLightSettings | ( | ) | [inline] |
Internally used by the FBX version 6.x and earlier readers/writers.
The relevant data that is contained in these objects have been moved into the KFbxGlobalSettings(). Therefore, any previous calls to these methods should be replaced by the above.
Definition at line 645 of file kfbxscene.h.
{ return *mGlobalLightSettings; }
KFbxGlobalCameraSettings& GlobalCameraSettings | ( | ) | [inline] |
Internally used by the FBX version 6.x and earlier readers/writers.
Definition at line 647 of file kfbxscene.h.
{ return *mGlobalCameraSettings; }
KFbxGlobalTimeSettings& GlobalTimeSettings | ( | ) | [inline] |
Internally used by the FBX version 6.x and earlier readers/writers.
Definition at line 649 of file kfbxscene.h.
{ return *mGlobalTimeSettings; }
friend class KFbxLayerContainer
[friend] |
Reimplemented from KFbxDocument.
Definition at line 662 of file kfbxscene.h.
friend class KFbxNodeFinderDuplicateName
[friend] |
Reimplemented from KFbxDocument.
Definition at line 663 of file kfbxscene.h.