Search code examples
c++assimp

Assimp loading armature from blender causing AI_SCENE_FLAGS_INCOMPLETE


I am working on a skeletal animation system using assimp for parsing of .fbx files. What I am looking to accomplish is the ability to load a .fbx file that contains only an armature (skeleton/rig). I would then load that armature into my own data structure and assign a reference to it as a member of a mesh (multiple meshes pointing to the same armature data).

Upon loading my .fbx file that contains a single armature (exported from blender) assimp appears to load everything as expected:

enter image description here

However, it appears that the AI_SCENE_FLAGS_INCOMPLETE bit is being flipped for some reason, as I find myself within the following block:

if (this->aiScene->mFlags & AI_SCENE_FLAGS_INCOMPLETE)
{
    std::string errorMessage = this->aiImporter.GetErrorString();
    std::cout << "ERROR::ASSIMP::" << errorMessage << "\n";
    std::cin.get();
    exit(EXIT_FAILURE);
}

...only this->aiImporter.GetErrorString() returns an empty string, providing no feedback as to why this might be.

So my question is...Why does the AI_SCENE_FLAGS_INCOMPLETE bit get flipped to true when only loading an armature? Should I simply ignore this and continue on my merry way, or is there some cause for concern?

(Yes, I have loaded multiple other files containing meshes without armatures and meshes with armatures with no errors reported. Seems to only be an issue with a file containing ONLY an armature.)

EDIT (screenshot from debugging) enter image description here


Solution

  • I believe you should be able to safely ignore it. That flag is just set when there are no meshes loaded (which if I'm understanding correctly is intentional in your case).

    You can see the condition for that flag being set here: https://github.com/assimp/assimp/blob/7e5a0acc48efc54d7aa7900c36cd63db1fbeec9b/code/Blender/BlenderLoader.cpp#L411-L417