+ 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:
@@ -65,6 +65,7 @@ static const aiImporterDesc desc = {
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
BVHLoader::BVHLoader()
|
||||
: noSkeletonMesh()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@@ -89,6 +90,12 @@ bool BVHLoader::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool cs
|
||||
return false;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void BVHLoader::SetupProperties(const Importer* pImp)
|
||||
{
|
||||
noSkeletonMesh = pImp->GetPropertyInteger(AI_CONFIG_IMPORT_NO_SKELETON_MESHES,0) != 0;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Loader meta information
|
||||
const aiImporterDesc* BVHLoader::GetInfo () const
|
||||
@@ -119,8 +126,10 @@ void BVHLoader::InternReadFile( const std::string& pFile, aiScene* pScene, IOSys
|
||||
mLine = 1;
|
||||
ReadStructure( pScene);
|
||||
|
||||
// build a dummy mesh for the skeleton so that we see something at least
|
||||
SkeletonMeshBuilder meshBuilder( pScene);
|
||||
if (!noSkeletonMesh) {
|
||||
// build a dummy mesh for the skeleton so that we see something at least
|
||||
SkeletonMeshBuilder meshBuilder( pScene);
|
||||
}
|
||||
|
||||
// construct an animation from all the motion data we read
|
||||
CreateAnimation( pScene);
|
||||
|
||||
Reference in New Issue
Block a user