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

animation_gather_fcurve_channel_target called twice, instead of animation_gather_fcurve_channel #2351

Open
Phrogz opened this issue Sep 11, 2024 · 1 comment · May be fixed by #2364
Open
Labels
bug Something isn't working

Comments

@Phrogz
Copy link
Contributor

Phrogz commented Sep 11, 2024

Describe the bug
Writing an exporter extension, the animation_gather_fcurve_channel_target hook gets called twice per gathered action.

Based on naming conventions alone, I think this is a copy/paste error, and the second one is supposed to be animation_gather_fcurve_channel…and possibly is intended to have additional useful information passed along?

To Reproduce

  1. Write an exporter extension with:
    def animation_gather_fcurve_channel_target(self, blender_object, bone_name, export_settings):
        print(f'####### animation_gather_fcurve_channel_target {blender_object.name}/bone"{bone_name}"')
    
    def animation_gather_fcurve_channel_sampler(self, blender_object, bone_name, export_settings):
        print(f'####### animation_gather_fcurve_channel_sampler {blender_object.name}/bone"{bone_name}"')
  2. Export a glTF without sampling animations enabled.
  3. Notice debug output like:
    ####### animation_gather_fcurve_channel_target needle/bone"None"
    ####### animation_gather_fcurve_channel_sampler needle/bone"None"
    ####### animation_gather_fcurve_channel_target needle/bone"None"
    

Expected behavior
I think a distinct callback was intended for gather_animation_fcurves_channels.

Version

  • macOS
  • Blender Version 4.1; still present in main codebase.
@julienduroure
Copy link
Collaborator

Confirmed

@julienduroure julienduroure added the bug Something isn't working label Sep 12, 2024
@julienduroure julienduroure added this to the Blender 4.2 LTS milestone Sep 25, 2024
@julienduroure julienduroure linked a pull request Sep 26, 2024 that will close this issue
@julienduroure julienduroure removed a link to a pull request Sep 26, 2024
@julienduroure julienduroure linked a pull request Sep 28, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants