From 53990ffa4243014692b3d325cbe7c18efa911459 Mon Sep 17 00:00:00 2001 From: Alexey Medvedev Date: Tue, 31 Mar 2020 14:18:51 -0700 Subject: [PATCH] Check for existed bone --- code/PostProcessing/SplitByBoneCountProcess.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/PostProcessing/SplitByBoneCountProcess.cpp b/code/PostProcessing/SplitByBoneCountProcess.cpp index 015ba9bf6..1fd26c757 100644 --- a/code/PostProcessing/SplitByBoneCountProcess.cpp +++ b/code/PostProcessing/SplitByBoneCountProcess.cpp @@ -217,7 +217,11 @@ void SplitByBoneCountProcess::SplitMesh( const aiMesh* pMesh, std::vector& vb = vertexBones[face.mIndices[b]]; for( unsigned int c = 0; c < vb.size(); ++c) { - newBonesAtCurrentFace.insert(vb[c].first); + unsigned int boneIndex = vb[c].first; + if( !isBoneUsed[boneIndex] ) + { + newBonesAtCurrentFace.insert(boneIndex); + } } }