Explorar o código

fix wrong target idx when importing

Yingying Wang %!s(int64=5) %!d(string=hai) anos
pai
achega
60e8146b9f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      code/AssetLib/glTF2/glTF2Asset.inl

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

@@ -1002,7 +1002,7 @@ inline void Mesh::Read(Value &pJSON_Object, Asset &pAsset_Root) {
                         // Valid attribute semantics include POSITION, NORMAL, TANGENT
                         int undPos = 0;
                         Mesh::AccessorList *vec = 0;
-                        if (GetAttribTargetVector(prim, i, attr, vec, undPos)) {
+                        if (GetAttribTargetVector(prim, j, attr, vec, undPos)) {
                             size_t idx = (attr[undPos] == '_') ? atoi(attr + undPos + 1) : 0;
                             if ((*vec).size() <= idx) {
                                 (*vec).resize(idx + 1);