MCPcopy Create free account
hub / github.com/beefytech/Beef / InitializeSdkObjects

Function InitializeSdkObjects

BeefySysLib/fbx/FBXReader.cpp:56–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56static 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
84static void DestroySdkObjects(FbxManager* pManager, bool pExitStatus)
85{

Callers 1

ReadFileMethod · 0.85

Calls 1

BufferMethod · 0.80

Tested by

no test coverage detected