glTF-Blender-IO icon indicating copy to clipboard operation
glTF-Blender-IO copied to clipboard

Unexpected animation sorting - recommended way to get animation index in final glTF per blender action

Open marwie opened this issue 1 year ago • 2 comments

Describe the bug Our animation export plugin uses json pointer to reference animations in the glTF /animations/<index> where the index uses the order of the blender actions that are passed to the gather_actions_hook

I just notices that this doesnt work anymore since the animations get sorted alphabetically after they have been gathered

For animations with the same name this also leads to undefined sorting / order of animations which breaks roundtrips

Expected behavior gather_animation or action hooks match the order in which they appear in the glTF

Which would be the correct callback to match gltf animations with the apropriate blender actions / tracks to fix this? Is there a reason for sorting the actions? If necessary could the sorting be done before calling the hook and not change the order anymore afterwards?

Version

  • OS: win10
  • Blender Version 3.6.4

marwie avatar Nov 16 '23 17:11 marwie