Verbose processor bone weight count fix
parent
1407491a67
commit
6e6807ee6c
|
@ -161,6 +161,7 @@ bool MakeVerboseFormatProcess::MakeVerboseFormat(aiMesh *pcMesh) {
|
||||||
delete[] pcMesh->mBones[i]->mWeights;
|
delete[] pcMesh->mBones[i]->mWeights;
|
||||||
if (!newWeights[i].empty()) {
|
if (!newWeights[i].empty()) {
|
||||||
pcMesh->mBones[i]->mWeights = new aiVertexWeight[newWeights[i].size()];
|
pcMesh->mBones[i]->mWeights = new aiVertexWeight[newWeights[i].size()];
|
||||||
|
pcMesh->mBones[i]->mNumWeights = static_cast<unsigned int>(newWeights[i].size());
|
||||||
aiVertexWeight *weightToCopy = &(newWeights[i][0]);
|
aiVertexWeight *weightToCopy = &(newWeights[i][0]);
|
||||||
memcpy(pcMesh->mBones[i]->mWeights, weightToCopy,
|
memcpy(pcMesh->mBones[i]->mWeights, weightToCopy,
|
||||||
sizeof(aiVertexWeight) * newWeights[i].size());
|
sizeof(aiVertexWeight) * newWeights[i].size());
|
||||||
|
|
Loading…
Reference in New Issue