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

changing easing after keyframe creation has no effect #227

Open
maweigert opened this issue Aug 23, 2024 · 1 comment
Open

changing easing after keyframe creation has no effect #227

maweigert opened this issue Aug 23, 2024 · 1 comment

Comments

@maweigert
Copy link

maweigert commented Aug 23, 2024

Description

I noticed changes to the easing function of a keyframe (e.g from linear to exponential) after creation in the napari plugin has no effect when saving as a movie (i.e. the easing function at capture times is still in effect).

Steps to reproduce:

  • Add two keyframes a different position with easing "linear"
  • change both easing function to "exponential"
  • save movie (which then still uses linear)

Possible reasons

self.animation._frames._rebuild_keyframe_index() is not called when the ease combo box is changed

Possible fix

Adding it to the update function in

def _update_animation_ease(self, event):

solves the issue. But this might not be the best place...

    def _update_animation_ease(self, event):
        """update state of 'ease' at current key-frame to reflect GUI state"""
        active_keyframe = self.animation.key_frames.selection.active
        active_keyframe.ease = self.get_easing_func()
        self.animation._frames._rebuild_keyframe_index()
@psobolewskiPhD
Copy link
Member

Thanks for the issue @maweigert
I will try to take a look at this more closely tomorrow.
❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants