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.

pull/4032/head
Max Vollmer (Microsoft Havok) 2021-08-13 17:46:10 +01:00
parent de2f5cf021
commit c1e830cf3b
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}