瀏覽代碼

The GLTF2 specs aren't very specific about the restrictions of the number of keyframes in sampler input and output. It seems logical that they should be the same, but there is an official sample model from Khronos where output has more keyframes. I thus assume that the GLTF2 standard allows more keyframes in output, but not in input. Fixed the check accordingly.

Max Vollmer (Microsoft Havok) 4 年之前
父節點
當前提交
c1e830cf3b
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      code/AssetLib/glTF2/glTF2Importer.cpp

+ 2 - 2
code/AssetLib/glTF2/glTF2Importer.cpp

@@ -1337,8 +1337,8 @@ std::unordered_map<unsigned int, AnimationSamplers> GatherSamplers(Animation &an
         }
 
         auto& animsampler = anim.samplers[channel.sampler];
-        if (animsampler.input->count != animsampler.output->count) {
-            ASSIMP_LOG_WARN("Animation ", anim.name, ": Sampler input size ", animsampler.input->count, " doesn't match output size ", animsampler.output->count);
+        if (animsampler.input->count > animsampler.output->count) {
+            ASSIMP_LOG_WARN("Animation ", anim.name, ": Number of keyframes in sampler input ", animsampler.input->count, " exceeds number of keyframes in sampler output ", animsampler.output->count);
             continue;
         }