Creating a scene and getting its root node
 
 
 

FBX applications using create the scene object immediately after creating the SDK Manager object:

// Declarations
KFbxSdkManager* gSdkManager = NULL;
KFbxScene*      gScene      = NULL;
const KFbxNode* gRootNode   = NULL;
...
// Create SDK manager to manage memory
gSdkManager = KFbxSdkManager::Create();
 
// Create scene object
gScene = KFbxScene::Create(gSdkManager, "");

In FBX, a scene has exactly one root node. KFbxScene has a function GetRootNode() which returns a reference to the root node of a scene:

//Get the scene’s root node
KFbxNode* gScene->GetRootNode();

All nodes in an FBX scene graph are, directly or indirectly, children of the root node:

Scene objects are instances of Class KFbxScene. Node objects are instances of Class KFbxNode.

The root node referenced by a KFBXScene object is not saved in an exported file. So if you want, for example, to apply a global translation to all objects in the scene:

  1. Create a node (named, for example, RootNodeForGlobals) below RootNode and above the BallNode, HoopNode, etc.
  2. Apply the global translation to RootNodeForGlobals.

RootNodeForGlobals will be saved with the global translation properties.