Browse Source

Fix bone fitted check in gltf2 exporter

Colin Reeder 3 years ago
parent
commit
87e9dbac40
1 changed files with 1 additions and 1 deletions
  1. 1 1
      code/AssetLib/glTF2/glTF2Exporter.cpp

+ 1 - 1
code/AssetLib/glTF2/glTF2Exporter.cpp

@@ -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 {