+ 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

@@ -123,6 +123,7 @@ void LWS::Element::Parse (const char*& buffer)
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
LWSImporter::LWSImporter()
: noSkeletonMesh()
{
// nothing to do here
}
@@ -177,6 +178,8 @@ void LWSImporter::SetupProperties(const Importer* pImp)
if (last < first) {
std::swap(last,first);
}
noSkeletonMesh = pImp->GetPropertyInteger(AI_CONFIG_IMPORT_NO_SKELETON_MESHES,0) != 0;
}
// ------------------------------------------------------------------------------------------------
@@ -908,7 +911,7 @@ void LWSImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
if (!pScene->mNumMeshes || !pScene->mNumMaterials) {
pScene->mFlags |= AI_SCENE_FLAGS_INCOMPLETE;
if (pScene->mNumAnimations) {
if (pScene->mNumAnimations && !noSkeletonMesh) {
// construct skeleton mesh
SkeletonMeshBuilder builder(pScene);
}