Merge pull request #4318 from vpzomtrrfrt/fix-bone-fit-check

Fix bone fitted check in gltf2 exporter
kimkulling-prepare_v5.1.6
Kim Kulling 2022-01-08 12:59:21 +01:00 committed by GitHub
commit cb3e846a19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -972,7 +972,7 @@ void ExportSkin(Asset &mAsset, const aiMesh *aimesh, Ref<Mesh> &meshRef, Ref<Buf
}
if (jointsPerVertex[vertexId] > 3) {
int boneIndexFitted = FitBoneWeight(vertexWeightData[vertexId], vertWeight);
if (boneIndexFitted) {
if (boneIndexFitted != -1) {
vertexJointData[vertexId][boneIndexFitted] = static_cast<float>(jointNamesIndex);
}
}else {