Просмотр исходного кода

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 лет назад
Родитель
Сommit
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;
         }