| 54 | } |
| 55 | |
| 56 | static void InitializeSdkObjects(FbxManager*& pManager, FbxScene*& pScene) |
| 57 | { |
| 58 | //The first thing to do is to create the FBX Manager which is the object allocator for almost all the classes in the SDK |
| 59 | pManager = FbxManager::Create(); |
| 60 | if (!pManager) |
| 61 | { |
| 62 | FBXSDK_printf("Error: Unable to create FBX Manager!\n"); |
| 63 | exit(1); |
| 64 | } |
| 65 | else FBXSDK_printf("Autodesk FBX SDK version %s\n", pManager->GetVersion()); |
| 66 | |
| 67 | //Create an IOSettings object. This object holds all import/export settings. |
| 68 | FbxIOSettings* ios = FbxIOSettings::Create(pManager, IOSROOT); |
| 69 | pManager->SetIOSettings(ios); |
| 70 | |
| 71 | //Load plugins from the executable directory (optional) |
| 72 | FbxString lPath = FbxGetApplicationDirectory(); |
| 73 | pManager->LoadPluginsDirectory(lPath.Buffer()); |
| 74 | |
| 75 | //Create an FBX scene. This object holds most objects imported/exported from/to files. |
| 76 | pScene = FbxScene::Create(pManager, "My Scene"); |
| 77 | if (!pScene) |
| 78 | { |
| 79 | FBXSDK_printf("Error: Unable to create FBX scene!\n"); |
| 80 | exit(1); |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | static void DestroySdkObjects(FbxManager* pManager, bool pExitStatus) |
| 85 | { |