+ 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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user