Browse Source

Update glTF2Asset.inl

Fixing mistakes in attribute names for GLTF. This causes attribute index to not be parsed out correctly (e.g. JOINTS_1) and fails the scene load.
Promit Roy 3 years ago
parent
commit
765b38cf04
1 changed files with 2 additions and 2 deletions
  1. 2 2
      code/AssetLib/glTF2/glTF2Asset.inl

+ 2 - 2
code/AssetLib/glTF2/glTF2Asset.inl

@@ -179,11 +179,11 @@ inline bool GetAttribVector(Mesh::Primitive &p, const char *attr, Mesh::Accessor
         v = &(p.attributes.texcoord);
     } else if ((pos = Compare(attr, "COLOR"))) {
         v = &(p.attributes.color);
-    } else if ((pos = Compare(attr, "JOINT"))) {
+    } else if ((pos = Compare(attr, "JOINTS"))) {
         v = &(p.attributes.joint);
     } else if ((pos = Compare(attr, "JOINTMATRIX"))) {
         v = &(p.attributes.jointmatrix);
-    } else if ((pos = Compare(attr, "WEIGHT"))) {
+    } else if ((pos = Compare(attr, "WEIGHTS"))) {
         v = &(p.attributes.weight);
     } else
         return false;