mirror of
https://github.com/ManimCommunity/manim.git
synced 2026-06-22 10:01:47 +00:00
Fixing AnimationGroup remover behavior
This commit is contained in:
parent
85db7ac248
commit
4ea40d2f58
2 changed files with 6 additions and 1 deletions
|
|
@ -60,6 +60,7 @@ class AnimationGroup(Animation):
|
|||
**kwargs,
|
||||
) -> None:
|
||||
arg_anim = flatten_iterable_parameters(animations)
|
||||
|
||||
self.animations = [prepare_animation(anim) for anim in arg_anim]
|
||||
self.rate_func = rate_func
|
||||
self.group = group
|
||||
|
|
@ -87,6 +88,8 @@ class AnimationGroup(Animation):
|
|||
)
|
||||
|
||||
for anim in self.animations:
|
||||
if self.introducer:
|
||||
anim.introducer = True
|
||||
anim.begin()
|
||||
self.process_subanimation_buffer(anim.buffer)
|
||||
|
||||
|
|
@ -100,6 +103,9 @@ class AnimationGroup(Animation):
|
|||
self.anims_begun[:] = True
|
||||
self.anims_finished[:] = True
|
||||
for anim in self.animations:
|
||||
if self.remover:
|
||||
anim.remover = True
|
||||
anim.finish()
|
||||
self.process_subanimation_buffer(anim.buffer)
|
||||
|
||||
if self.suspend_mobject_updating:
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ def test_succession_in_succession_timing():
|
|||
)
|
||||
assert nested_succession.get_run_time() == 5.0
|
||||
assert succession.get_run_time() == 10.0
|
||||
succession._setup_scene(MagicMock())
|
||||
succession.begin()
|
||||
succession.interpolate(0.1)
|
||||
assert succession.active_index == 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue