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

Hook `gather_actions_hook` is not invoked when "export_pointer_animation" is enabled

Open marwie opened this issue 7 months ago • 1 comments

Describe the bug I'm trying to export KHR_animation_pointer programmatically and noticed that the gather_actions_hook isnt invoked anymore when enabling the following settings:

args["export_animation_mode"] = "SCENE"
args["export_pointer_animation"] = True

Is this expected?

It currently breaks cases where I listen to animations being done exporting so that I can resolve json pointers to the correct animation index in the resulting glTF. (Maybe it's possible to resolve the pointers later in the process but I need access to both the the blender_action<>gltf_animation objects which is what the hook above provides)

To Reproduce Steps to reproduce the behavior:

  1. Create exporter extension that implements def gather_actions_hook(self, blender_object, params, export_settings):
  2. Add breakpoint in hook
  3. Invoke export operator programmatically with export_animations: True
  4. Note breakpoint at gather_actions_hook is hit
  5. Invoke export operator programmatically with export_animations: True and set export_animation_mode: SCENE + export_pointer_animation: TRUE
  6. Note that breakpoint at gather_actions_hook is not hit anymore

Expected behavior gather_actions_hook is always invoked

.blend file/ .gltf (mandatory)

anim.zip

Version

  • OS: WIN 10
  • Blender Version 4.2

marwie avatar Jul 24 '24 12:07 marwie