فهرست منبع

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];
         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;
             continue;
         }
         }