From 6e6807ee6c19455bfac83bca4391eca80d31730e Mon Sep 17 00:00:00 2001 From: freizhang Date: Sat, 13 Nov 2021 11:56:15 +0800 Subject: [PATCH] Verbose processor bone weight count fix --- code/PostProcessing/MakeVerboseFormat.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/code/PostProcessing/MakeVerboseFormat.cpp b/code/PostProcessing/MakeVerboseFormat.cpp index 8410cc9d4..71c1cc439 100644 --- a/code/PostProcessing/MakeVerboseFormat.cpp +++ b/code/PostProcessing/MakeVerboseFormat.cpp @@ -161,6 +161,7 @@ bool MakeVerboseFormatProcess::MakeVerboseFormat(aiMesh *pcMesh) { delete[] pcMesh->mBones[i]->mWeights; if (!newWeights[i].empty()) { pcMesh->mBones[i]->mWeights = new aiVertexWeight[newWeights[i].size()]; + pcMesh->mBones[i]->mNumWeights = static_cast(newWeights[i].size()); aiVertexWeight *weightToCopy = &(newWeights[i][0]); memcpy(pcMesh->mBones[i]->mWeights, weightToCopy, sizeof(aiVertexWeight) * newWeights[i].size());