+ add AI_CONFIG_IMPORT_NO_SKELETON_MESHES flag to control skeleton mesh visualization. No need for this in Blender, and difficult to just ignore the geometry created by it.

This commit is contained in:
Alexander Gessler
2012-06-21 17:24:50 +02:00
parent 43e19c682f
commit 4e9a0bba20
11 changed files with 68 additions and 12 deletions

View File

@@ -73,6 +73,7 @@ static const aiImporterDesc desc = {
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
ColladaLoader::ColladaLoader()
: noSkeletonMesh()
{}
// ------------------------------------------------------------------------------------------------
@@ -103,6 +104,13 @@ bool ColladaLoader::CanRead( const std::string& pFile, IOSystem* pIOHandler, boo
return false;
}
// ------------------------------------------------------------------------------------------------
void ColladaLoader::SetupProperties(const Importer* pImp)
{
noSkeletonMesh = pImp->GetPropertyInteger(AI_CONFIG_IMPORT_NO_SKELETON_MESHES,0) != 0;
}
// ------------------------------------------------------------------------------------------------
// Get file extension list
const aiImporterDesc* ColladaLoader::GetInfo () const
@@ -180,7 +188,9 @@ void ColladaLoader::InternReadFile( const std::string& pFile, aiScene* pScene, I
// If no meshes have been loaded, it's probably just an animated skeleton.
if (!pScene->mNumMeshes) {
SkeletonMeshBuilder hero(pScene);
if (!noSkeletonMesh) {
SkeletonMeshBuilder hero(pScene);
}
pScene->mFlags |= AI_SCENE_FLAGS_INCOMPLETE;
}
}