This reference page is linked to from the following overview topics: FBX SDK 2014, 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 Data Structures, Animation Classes and their Interrelationships, Writing and Using your Own Evaluator, Extracting the Animation Data from a FBX File, Evaluating the Animation in a Scene, Using Python FBX with Eclipse, List of Python Fbx classes.
This class contains the description of a 3D scene.
It contains the nodes (including the root node) (FbxNode), 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 (FbxAnimEvaluator) is used to compute animation values for animated scenes.
Definition at line 61 of file fbxscene.h.
#include <fbxscene.h>

Public Member Functions | |
| void | FillPoseArray (FbxArray< FbxPose * > &pPoseArray) |
| Clear then fill a pose array with all existing pose included in the scene. | |
| virtual FbxObject * | Clone (FbxObject::ECloneType pCloneType=eDeepClone, FbxObject *pContainer=NULL) const |
| Clone this scene object (and everything else it contains if clone type is eDeepClone) | |
| virtual FbxObject & | Copy (const FbxObject &pObject) |
| Copy an object content into this object. | |
| void | ConnectMaterials () |
| void | BuildMaterialLayersDirectArray () |
| void | ReindexMaterialConnections () |
| FbxSet * | AddTakeTimeWarpSet (char *pTakeName) |
| FbxSet * | GetTakeTimeWarpSet (char *pTakeName) |
| void | ForceKill () |
| void | ConvertNurbsSurfaceToNurbs () |
| void | ConvertMeshNormals () |
| void | ConvertNurbsCurvesToNulls () |
| void | ConnectTextures () |
| void | BuildTextureLayersDirectArray () |
| void | FixInheritType (FbxNode *pNode) |
| void | UpdateScaleCompensate (FbxNode *pNode, FbxIOSettings &pIOS) |
| FbxClassId | ConvertAttributeTypeToClassID (FbxNodeAttribute::EType pAttributeType) |
| FbxGlobalLightSettings & | GlobalLightSettings () |
| FbxGlobalCameraSettings & | GlobalCameraSettings () |
Clear scene | |
| void | Clear () |
| Delete the node tree below the root node and restore default settings. | |
Node Tree Access | |
| FbxNode * | GetRootNode () const |
| Get the root node of the scene. | |
Texture Material and Video Access | |
| void | FillTextureArray (FbxArray< FbxTexture * > &pTextureArray) |
| Clear, then fill, a texture array with all existing textures included in the scene. | |
| void | FillMaterialArray (FbxArray< FbxSurfaceMaterial * > &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. | |
| FbxGenericNode * | GetGenericNode (int pIndex) |
| Get generic node at given index. | |
| FbxGenericNode * | GetGenericNode (char *pName) |
| Access a generic node from its name. | |
| bool | AddGenericNode (FbxGenericNode *pGenericNode) |
| Add a generic node to this scene. | |
| bool | RemoveGenericNode (FbxGenericNode *pGenericNode) |
| Remove the generic node from this scene. | |
Character Management | |
| int | GetCharacterCount () const |
| Get number of characters. | |
| FbxCharacter * | GetCharacter (int pIndex) |
| Get character at given index. | |
| int | CreateCharacter (const char *pName) |
| Create a new character. | |
| void | DestroyCharacter (int pIndex) |
| Destroy character. | |
ControlSetPlug Management | |
| int | GetControlSetPlugCount () const |
| Get number of ControlSetPlugs. | |
| FbxControlSetPlug * | 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. | |
| FbxCharacterPose * | 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. | |
| FbxPose * | GetPose (int pIndex) |
| Get pose at given index. | |
| bool | AddPose (FbxPose *pPose) |
| Add a pose to this scene. | |
| bool | RemovePose (FbxPose *pPose) |
| Remove the specified pose from the scene. | |
| bool | RemovePose (int pIndex) |
| Remove the pose at the given index from the scene. | |
Scene information | |
| FbxDocumentInfo * | GetSceneInfo () |
| Get the scene information. | |
| void | SetSceneInfo (FbxDocumentInfo *pSceneInfo) |
| Set the scene information. | |
Global Settings | |
| FbxGlobalSettings & | GetGlobalSettings () |
| Access global settings. | |
| const FbxGlobalSettings & | 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.
FbxAMatrix& lGlobalMatrix = lNode->GetScene()->GetEvaluator()->GetNodeGlobalTransform(lNode, lTime); or the exact equivalent: FbxAMatrix& lGlobalMatrix = lNode->EvaluateGlobalTransform(lTime); | |
| void | SetEvaluator (FbxAnimEvaluator *pEvaluator) |
| Set the global evaluator used by this scene evaluation engine. | |
| FbxAnimEvaluator * | GetEvaluator () |
| Get the global evaluator used by this scene evaluation engine. | |
Material Access | |
| int | GetMaterialCount () const |
| Get number of materials. | |
| FbxSurfaceMaterial * | GetMaterial (int pIndex) |
| Get the material at the given index. | |
| FbxSurfaceMaterial * | GetMaterial (char *pName) |
| Get the material by its name. | |
| bool | AddMaterial (FbxSurfaceMaterial *pMaterial) |
| Add the material to this scene. | |
| bool | RemoveMaterial (FbxSurfaceMaterial *pMaterial) |
| Remove the material from this scene. | |
Texture Access | |
| int | GetTextureCount () const |
| Get number of textures (type FbxTexture). | |
| FbxTexture * | GetTexture (int pIndex) |
| Get the texture at the given index. | |
| FbxTexture * | GetTexture (char *pName) |
| Get the texture by its name. | |
| bool | AddTexture (FbxTexture *pTexture) |
| Add the texture to this scene. | |
| bool | RemoveTexture (FbxTexture *pTexture) |
| Remove the texture from this scene. | |
Node Access | |
| int | GetNodeCount () const |
| Get number of nodes. | |
| FbxNode * | GetNode (int pIndex) |
| Get the node at the given index. | |
| bool | AddNode (FbxNode *pNode) |
| Add the node to this scene. | |
| bool | RemoveNode (FbxNode *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. | |
| FbxNode * | FindNodeByName (const FbxString &pName) |
| Get the first node with this name. | |
Geometry Access | |
| int | GetGeometryCount () const |
| Get number of geometries. | |
| FbxGeometry * | GetGeometry (int pIndex) |
| Get the geometry at the given index. | |
| bool | AddGeometry (FbxGeometry *pGeometry) |
| Add the geometry to this scene. | |
| bool | RemoveGeometry (FbxGeometry *pGeometry) |
| Remove the geometry from this scene. | |
Video Access | |
| int | GetVideoCount () const |
| Get number of videos. | |
| FbxVideo * | GetVideo (int pIndex) |
| Get the video at the given index. | |
| bool | AddVideo (FbxVideo *pVideo) |
| Add the video to this scene. | |
| bool | RemoveVideo (FbxVideo *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 FbxDocument.
| FbxNode* GetRootNode | ( | ) | const |
Get the root node of the scene.
| void FillTextureArray | ( | FbxArray< FbxTexture * > & | pTextureArray | ) |
Clear, then fill, a texture array with all existing textures included in the scene.
| pTextureArray | An array of texture pointers. |
| void FillMaterialArray | ( | FbxArray< FbxSurfaceMaterial * > & | 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.
| FbxGenericNode* 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. | FbxGenericNode* GetGenericNode | ( | char * | pName | ) |
Access a generic node from its name.
| pName | Name of the generic node. |
| bool AddGenericNode | ( | FbxGenericNode * | 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 | ( | FbxGenericNode * | 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 |
| FbxCharacter* 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 | ( | const char * | pName | ) |
Create a new character.
| pName | Name given to character. |
| void DestroyCharacter | ( | int | pIndex | ) |
| int GetControlSetPlugCount | ( | ) | const |
Get number of ControlSetPlugs.
| FbxControlSetPlug* 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.
| FbxCharacterPose* 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.
| FbxPose* GetPose | ( | int | pIndex | ) |
Get pose at given index.
| pIndex | Position in the list of poses. |
NULL if index is out of bounds. | bool AddPose | ( | FbxPose * | 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 | ( | FbxPose * | 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. | FbxDocumentInfo* GetSceneInfo | ( | ) | [inline] |
Get the scene information.
Definition at line 279 of file fbxscene.h.
{ return GetDocumentInfo(); }
| void SetSceneInfo | ( | FbxDocumentInfo * | pSceneInfo | ) | [inline] |
Set the scene information.
| pSceneInfo | Pointer to the scene information object. |
Definition at line 284 of file fbxscene.h.
{ SetDocumentInfo(pSceneInfo); }
| FbxGlobalSettings& GetGlobalSettings | ( | ) |
| const FbxGlobalSettings& GetGlobalSettings | ( | ) | const |
Const access to global settings.
| void SetEvaluator | ( | FbxAnimEvaluator * | pEvaluator | ) |
Set the global evaluator used by this scene evaluation engine.
| pEvaluator | The evaluator to be used for evaluation processing of this scene. |
| FbxAnimEvaluator* 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.
Clear then fill a pose array with all existing pose included in the scene.
| pPoseArray | An array of pose pointers. |
| int GetMaterialCount | ( | ) | const |
| FbxSurfaceMaterial* 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. | FbxSurfaceMaterial* GetMaterial | ( | char * | pName | ) |
Get the material by its name.
| pName | Name of the material. |
NULL if not found. | bool AddMaterial | ( | FbxSurfaceMaterial * | pMaterial | ) |
Add the material to this scene.
| pMaterial | Pointer to the material to be added. |
| bool RemoveMaterial | ( | FbxSurfaceMaterial * | pMaterial | ) |
Remove the material from this scene.
| pMaterial | Pointer to the material to be removed. |
| int GetTextureCount | ( | ) | const |
Get number of textures (type FbxTexture).
int lNbFileTextures = lScene->GetSrcObjectCount<FbxFileTexture>(); int lNbLayeredTextures = lScene->GetSrcObjectCount<FbxLayeredTexture>(); int lNbProceduralTextures = lScene->GetSrcObjectCount<FbxProceduralTexture>();
| FbxTexture* 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. FbxFileTexture* lFileTexture = lScene->GetSrcObject<FbxFileTexture>(i); FbxLayeredTexture* lLayeredTexture = lScene->GetSrcObject<FbxLayeredTexture>(i); FbxProceduralTexture* lProceduralTexture = lScene->GetSrcObject<FbxProceduralTexture>(i);
| FbxTexture* GetTexture | ( | char * | pName | ) |
Get the texture by its name.
| pName | Name of the texture. |
NULL if not found. | bool AddTexture | ( | FbxTexture * | pTexture | ) |
Add the texture to this scene.
| pTexture | Pointer to the texture to be added. |
true on successful addition. | bool RemoveTexture | ( | FbxTexture * | pTexture | ) |
Remove the texture from this scene.
| pTexture | Pointer to the texture to be removed. |
true on successful removal. | int GetNodeCount | ( | ) | const |
| FbxNode* 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 | ( | FbxNode * | pNode | ) |
Add the node to this scene.
| pNode | Pointer to the node to be added. |
| bool RemoveNode | ( | FbxNode * | 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 FbxNode 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 |
| FbxGeometry* 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 | ( | FbxGeometry * | pGeometry | ) |
Add the geometry to this scene.
| pGeometry | Pointer to the geometry to be added. |
| bool RemoveGeometry | ( | FbxGeometry * | pGeometry | ) |
Remove the geometry from this scene.
| pGeometry | Pointer to the geometry to be removed. |
| int GetVideoCount | ( | ) | const |
| FbxVideo* 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 | ( | FbxVideo * | pVideo | ) |
Add the video to this scene.
| pVideo | Pointer to the video to be added. |
| bool RemoveVideo | ( | FbxVideo * | 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 FbxImporter::Import() or just before the calls to the FbxExporter::Export().
| virtual FbxObject* Clone | ( | FbxObject::ECloneType | pCloneType = eDeepClone, |
| FbxObject * | pContainer = NULL |
||
| ) | const [virtual] |
Clone this scene object (and everything else it contains if clone type is eDeepClone)
| pCloneType | The type of clone to be created. By default, the clone type is eDeepClone. |
| pContainer | An optional parameter to specify which object will "contain" the new object. By contain, we mean the new object will become a source to the container, connection-wise. |
Reimplemented from FbxObject.
Copy an object content into this object.
| pObject | The source object to copy data from. |
Reimplemented from FbxDocument.
| void ConnectMaterials | ( | ) |
| void BuildMaterialLayersDirectArray | ( | ) |
| void ReindexMaterialConnections | ( | ) |
| FbxSet* AddTakeTimeWarpSet | ( | char * | pTakeName | ) |
| FbxSet* GetTakeTimeWarpSet | ( | char * | pTakeName | ) |
| void ForceKill | ( | ) |
| void ConvertNurbsSurfaceToNurbs | ( | ) |
| void ConvertMeshNormals | ( | ) |
| void ConvertNurbsCurvesToNulls | ( | ) |
| void ConnectTextures | ( | ) |
| void BuildTextureLayersDirectArray | ( | ) |
| void FixInheritType | ( | FbxNode * | pNode | ) |
| void UpdateScaleCompensate | ( | FbxNode * | pNode, |
| FbxIOSettings & | pIOS | ||
| ) |
| FbxClassId ConvertAttributeTypeToClassID | ( | FbxNodeAttribute::EType | pAttributeType | ) |
| FbxGlobalLightSettings& GlobalLightSettings | ( | ) | [inline] |
Definition at line 610 of file fbxscene.h.
{ return *mGlobalLightSettings; }
| FbxGlobalCameraSettings& GlobalCameraSettings | ( | ) | [inline] |
Definition at line 611 of file fbxscene.h.
{ return *mGlobalCameraSettings; }