This reference page is linked to from the following overview topics: Animation Classes and their Interrelationships, FBX Extensions to Maya, Animating a Node, FBX Extensions to 3ds Max, Customizing the FBX SDK, Importing a Scene, Your First FBX SDK Program, FBX Extensions to MotionBuilder, Exporting a Scene, Exporting with the FBX Extensions SDK, Writing and Using your Own Evaluator, Supported Scene Elements, FBX Scenes, Importing with the FBX Extensions SDK, Information and Technical Support, Using Python FBX with Eclipse, Instancing - Sharing a Mesh, Merging Two Scenes, Customizing File Formats with FBX SDK I/O Plug-ins, FBX Objects, FBX Nodes, Managing Memory with the FBX SDK Manager, List of Python Fbx classes, Transformation Data, FBX Properties, Extracting the Animation Data from a FBX File, Connections, Evaluating the Animation in a Scene, Lights, Animation Data Structures.
#include <fbxscene.h>
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.
Animation/main.cxx, Camera/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, ExportShader/main.cxx, ImportScene/DisplayAnimation.cxx, ImportScene/DisplayAnimation.h, ImportScene/DisplayGenericInfo.cxx, ImportScene/DisplayGenericInfo.h, ImportScene/DisplayHierarchy.cxx, ImportScene/DisplayHierarchy.h, ImportScene/DisplayPose.cxx, ImportScene/DisplayPose.h, 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, UI_Examples/Common/ImportExport.cxx, UI_Examples/Common/ImportExport.h, UI_Examples/CubeCreator/SDK_Utility.cxx, UI_Examples/CubeCreator/SDK_Utility.h, UI_Examples/CubeCreator/UI.cxx, UI_Examples/SceneTreeView/SDK_Utility.cxx, UI_Examples/SceneTreeView/SDK_Utility.h, UI_Examples/SceneTreeView/UI.cxx, UserProperties/main.cxx, UVSample/main.cxx, ViewScene/DrawScene.cxx, ViewScene/DrawScene.h, ViewScene/SceneContext.cxx, ViewScene/SceneContext.h, ViewScene/SetCamera.cxx, and ViewScene/SetCamera.h.
Definition at line 61 of file fbxscene.h.
Public Member Functions |
|
| void | FillPoseArray (FbxArray< FbxPose * > &pPoseArray) |
| Clear then fill a pose array with all
existing pose included in the scene. |
|
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
FbxAMatrix& lGlobalMatrix = lNode->GetScene()->GetEvaluator()->GetNodeGlobalTransform(lNode, lTime);
or the exact equivalent:
FbxAMatrix& lGlobalMatrix = lNode->EvaluateGlobalTransform(lTime);
The user can create one or more evaluators in the scene. The default evaluator is set using SetEvaluator. When GetEvaluator is called, if the scene has no evaluator, an evaluator is created with default values. |
|
| 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 | ) |
Destroy character.
| pIndex | Specify which character to destroy. |
| 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 | ( | ) |
Access global settings.
| 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 |
Get number of nodes.
| 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().