mirror of
https://github.com/3b1b/manim.git
synced 2025-09-19 04:41:56 +00:00
Added Animation.get_all_mobjects_to_update
This commit is contained in:
parent
1cc395ce8b
commit
5403237123
1 changed files with 10 additions and 1 deletions
|
@ -83,9 +83,18 @@ class Animation(object):
|
|||
suspended during the animation, this will do
|
||||
nothing to self.mobject.
|
||||
"""
|
||||
for mob in self.get_all_mobjects():
|
||||
for mob in self.get_all_mobjects_to_update():
|
||||
mob.update(dt)
|
||||
|
||||
def get_all_mobjects_to_update(self):
|
||||
# The surrounding scene typically handles
|
||||
# updating of self.mobject. Besides, in
|
||||
# most cases its updating is suspended anyway
|
||||
return list(filter(
|
||||
lambda m: m is not self.mobject,
|
||||
self.get_all_mobjects()
|
||||
))
|
||||
|
||||
def copy(self):
|
||||
return deepcopy(self)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue