ImportExport()declares an SDK manager object and a scene object, and then callsInitializeSDKObjects()to instantiate and initialize them:
KFbxSdkManager* lSdkManager;
KFbxScene* lScene
// Initialize the KFbxSdkManager and the KFbxScene
InitializeSdkObjects(lSdkManager, lScene);
ris the SDK manager, whose main purpose is to manage memory for FBX by keeping track of FBX objects that have been allocated and destroyed.
Class KFbxSdkManageInitializeSdkObjects()does it:
An FBX application or plugin typically begins by creating an SDK manager object. This is how ImportExport’svoid InitializeSdkObjects(
KFbxSdkManager*& pSdkManager,
KFbxScene*& pScene
)
{
pSdkManager = KFbxSdkManager::CreateKFbxSdkManager();
if (!pSdkManager)
{
UI_Printf("Unable to create the FBX SDK manager");
exit(0);
}
create()method. You pass your SDK manager object as a parameter:
For almost all classes in the FBX SDK, you instantiate an object by calling the class’s// Create the scene object. The scene will hold the data
// in the file to be imported.
pScene = KFbxScene::Create(pSdkManager,"");
}
Cleaning up and shutting down).
The SDK manager allocates memory for the new object (in this case, a scene). Later, when you no longer need the object, the SDK manager “destroys” it (see