update assimp
This commit is contained in:
@@ -103,7 +103,7 @@ void SplitByBoneCountProcess::Execute( aiScene* pScene)
|
||||
|
||||
if( !isNecessary )
|
||||
{
|
||||
ASSIMP_LOG_DEBUG( format() << "SplitByBoneCountProcess early-out: no meshes with more than " << mMaxBoneCount << " bones." );
|
||||
ASSIMP_LOG_DEBUG("SplitByBoneCountProcess early-out: no meshes with more than ", mMaxBoneCount, " bones." );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ void SplitByBoneCountProcess::Execute( aiScene* pScene)
|
||||
// recurse through all nodes and translate the node's mesh indices to fit the new mesh array
|
||||
UpdateNode( pScene->mRootNode);
|
||||
|
||||
ASSIMP_LOG_DEBUG( format() << "SplitByBoneCountProcess end: split " << mSubMeshIndices.size() << " meshes into " << meshes.size() << " submeshes." );
|
||||
ASSIMP_LOG_DEBUG( "SplitByBoneCountProcess end: split ", mSubMeshIndices.size(), " meshes into ", meshes.size(), " submeshes." );
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@@ -209,7 +209,7 @@ void SplitByBoneCountProcess::SplitMesh( const aiMesh* pMesh, std::vector<aiMesh
|
||||
// a small local set of new bones for the current face. State of all used bones for that face
|
||||
// can only be updated AFTER the face is completely analysed. Thanks to imre for the fix.
|
||||
std::set<unsigned int> newBonesAtCurrentFace;
|
||||
|
||||
|
||||
const aiFace& face = pMesh->mFaces[a];
|
||||
// check every vertex if its bones would still fit into the current submesh
|
||||
for( unsigned int b = 0; b < face.mNumIndices; ++b )
|
||||
@@ -221,7 +221,7 @@ void SplitByBoneCountProcess::SplitMesh( const aiMesh* pMesh, std::vector<aiMesh
|
||||
if( !isBoneUsed[boneIndex] )
|
||||
{
|
||||
newBonesAtCurrentFace.insert(boneIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -412,7 +412,7 @@ void SplitByBoneCountProcess::SplitMesh( const aiMesh* pMesh, std::vector<aiMesh
|
||||
if (pMesh->mNumAnimMeshes > 0) {
|
||||
newMesh->mNumAnimMeshes = pMesh->mNumAnimMeshes;
|
||||
newMesh->mAnimMeshes = new aiAnimMesh*[newMesh->mNumAnimMeshes];
|
||||
|
||||
|
||||
for (unsigned int morphIdx = 0; morphIdx < newMesh->mNumAnimMeshes; ++morphIdx) {
|
||||
aiAnimMesh* origTarget = pMesh->mAnimMeshes[morphIdx];
|
||||
aiAnimMesh* newTarget = new aiAnimMesh;
|
||||
@@ -421,16 +421,16 @@ void SplitByBoneCountProcess::SplitMesh( const aiMesh* pMesh, std::vector<aiMesh
|
||||
newTarget->mNumVertices = numSubMeshVertices;
|
||||
newTarget->mVertices = new aiVector3D[numSubMeshVertices];
|
||||
newMesh->mAnimMeshes[morphIdx] = newTarget;
|
||||
|
||||
|
||||
if (origTarget->HasNormals()) {
|
||||
newTarget->mNormals = new aiVector3D[numSubMeshVertices];
|
||||
}
|
||||
|
||||
|
||||
if (origTarget->HasTangentsAndBitangents()) {
|
||||
newTarget->mTangents = new aiVector3D[numSubMeshVertices];
|
||||
newTarget->mBitangents = new aiVector3D[numSubMeshVertices];
|
||||
}
|
||||
|
||||
|
||||
for( unsigned int vi = 0; vi < numSubMeshVertices; ++vi) {
|
||||
// find the source vertex for it in the source mesh
|
||||
unsigned int previousIndex = previousVertexIndices[vi];
|
||||
|
||||
Reference in New Issue
Block a user