You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What do we think about a 'wrap' mode for animations, you define the 'forward' pass and the rendered animation also contains the reverse for a nice loop.
I was thinking a bool attribute of the Animation class, exposed by a checkbox in the AnimationWidget.
That bool being set to True would modify a copy of the keyframe dict within Animation.animate to provide the reverse direction.
This approach is naive and would involve rerendering every frame but I don't know how I would reuse frames with the current state generator
The text was updated successfully, but these errors were encountered:
Ah to make "continuous movies"? I'd probably think about an enum. You might also just want a "loop" where you add the first frame on to the end of the list so that it ends and starts in the same place without doing the forward and reverse, though I can see how both are desirable.
For going in "reverse" I'd try to avoid copying the whole keyframe dict, but maybe you can just traverse it backwards with appropriate flags/ settings inside _state_generator which could now take a reverse=False bool input and if true you could do a 1-fraction in the appropriate place. Inside _frame_generator you could then call _state_generator twice, or add in that extra frame from the beginning depending on the "mode"
On Wed, 13 Jan 2021 at 05:06, Nicholas Sofroniew ***@***.***> wrote:
Ah to make "continuous movies"? I'd probably think about an enum. You
might also just want a "loop" where you add the first frame on to the end
of the list so that it ends and starts in the same place without doing the
forward and reverse, though I can see how both are desirable.
For going in "reverse" I'd try to avoid copying the whole keyframe dict,
but maybe you can just traverse it backwards with appropriate flags/
settings inside _state_generator which could now take a reverse=False
bool input and if true you could do a 1-fraction in the appropriate
place. Inside _frame_generator you could then call _state_generator
twice, or add in that extra frame from the beginning depending on the "mode"
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/sofroniewn/napari-animation/issues/13#issuecomment-759208117>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABXYBYFBDSVOS5BAE3S5QEDSZUS4VANCNFSM4V56QQNQ>
.
What do we think about a 'wrap' mode for animations, you define the 'forward' pass and the rendered animation also contains the reverse for a nice loop.
I was thinking a bool attribute of the
Animation
class, exposed by a checkbox in theAnimationWidget
.That bool being set to True would modify a copy of the keyframe dict within
Animation.animate
to provide the reverse direction.This approach is naive and would involve rerendering every frame but I don't know how I would reuse frames with the current state generator
The text was updated successfully, but these errors were encountered: