2
0
Эх сурвалжийг харах

Merge pull request #2243 from bubba/gltf2-anim-fix

Fix skins not always being loaded in GlTF2
Kim Kulling 6 жил өмнө
parent
commit
ef8b61237d
1 өөрчлөгдсөн 7 нэмэгдсэн , 0 устгасан
  1. 7 0
      code/glTF2Asset.inl

+ 7 - 0
code/glTF2Asset.inl

@@ -1357,6 +1357,13 @@ inline void Asset::Load(const std::string& pFile, bool isBinary)
         }
     }
 
+    // Force reading of skins since they're not always directly referenced
+    if (Value* skinsArray = FindArray(doc, "skins")) {
+        for (unsigned int i = 0; i < skinsArray->Size(); ++i) {
+            skins.Retrieve(i);
+        }
+    }
+
     if (Value* animsArray = FindArray(doc, "animations")) {
         for (unsigned int i = 0; i < animsArray->Size(); ++i) {
             animations.Retrieve(i);