I tried to load Blender file using Assimp library on C++ using the following code, but it fails since it doesn't have any meshes at all. The blender file I am using is the default cube saved using Blender itself.
Assimp::Importer importer;
const aiScene * scene = importer.ReadFile( path, aiProcessPreset_TargetRealtime_Fast );
if( !scene ) {
fprintf( stderr, importer.GetErrorString() );
return false;
}
const aiMesh * mesh = scene->mMeshes[0]; // Fails here since mMeshes is NULL
What am I doing wrong here, do I need to include special flag in order to load blender object ? Or do I need to export the Blender object in certain way ?