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

Fix skins not always being loaded in GlTF2
pull/2242/head^2
Kim Kulling 2018-11-28 02:52:56 +01:00 committed by GitHub
commit ef8b61237d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -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")) { if (Value* animsArray = FindArray(doc, "animations")) {
for (unsigned int i = 0; i < animsArray->Size(); ++i) { for (unsigned int i = 0; i < animsArray->Size(); ++i) {
animations.Retrieve(i); animations.Retrieve(i);