Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hook gather_actions_hook is not invoked when "export_pointer_animation" is enabled #2293

Open
marwie opened this issue Jul 24, 2024 · 1 comment
Labels
enhancement New feature or request hook

Comments

@marwie
Copy link

marwie commented Jul 24, 2024

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
@julienduroure
Copy link
Collaborator

Is this expected?

Yes, it is "expected".
gather_actions_hook is called when using "actions" animation mode, as the name of the hook indicates.
Using SCENE mode does not check any action or NLA or any data model related to animation.
It only bake the scene animation as it can be seen on viewport.

But ... we can probably add a hook to help you achieve what you want.
Once again, there is no actions here.
What can be done during the "SCENE" animation mode export:

  • 1 hook for each object (that will manage TRS / SK)
  • 1 hook for each material
  • 1 hook for each light
  • 1 hook for each cameras

@julienduroure julienduroure added enhancement New feature or request hook labels Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hook
Projects
None yet
Development

No branches or pull requests

2 participants