mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Allow mobject to prepare and cleanup from animations
This commit is contained in:
parent
ebd4016fb3
commit
19814ecf87
1 changed files with 2 additions and 0 deletions
|
@ -42,6 +42,7 @@ class Animation(object):
|
|||
# played. As much initialization as possible,
|
||||
# especially any mobject copying, should live in
|
||||
# this method
|
||||
self.mobject.prepare_for_animation()
|
||||
self.starting_mobject = self.create_starting_mobject()
|
||||
if self.suspend_mobject_updating:
|
||||
# All calls to self.mobject's internal updaters
|
||||
|
@ -55,6 +56,7 @@ class Animation(object):
|
|||
|
||||
def finish(self):
|
||||
self.interpolate(1)
|
||||
self.mobject.cleanup_from_animation()
|
||||
if self.suspend_mobject_updating:
|
||||
self.mobject.resume_updating()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue