+ 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

@@ -74,6 +74,7 @@ static const aiImporterDesc desc = {
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
ASEImporter::ASEImporter()
: noSkeletonMesh()
{}
// ------------------------------------------------------------------------------------------------
@@ -111,6 +112,8 @@ void ASEImporter::SetupProperties(const Importer* pImp)
{
configRecomputeNormals = (pImp->GetPropertyInteger(
AI_CONFIG_IMPORT_ASE_RECONSTRUCT_NORMALS,1) ? true : false);
noSkeletonMesh = pImp->GetPropertyInteger(AI_CONFIG_IMPORT_NO_SKELETON_MESHES,0) != 0;
}
// ------------------------------------------------------------------------------------------------
@@ -244,7 +247,9 @@ void ASEImporter::InternReadFile( const std::string& pFile,
// ------------------------------------------------------------------
if (!pScene->mNumMeshes) {
pScene->mFlags |= AI_SCENE_FLAGS_INCOMPLETE;
SkeletonMeshBuilder skeleton(pScene);
if (!noSkeletonMesh) {
SkeletonMeshBuilder skeleton(pScene);
}
}
}
// ------------------------------------------------------------------------------------------------