Added Animation.get_all_mobjects_to_update

This commit is contained in:
Grant Sanderson 2019-02-09 10:55:23 -08:00
parent 1cc395ce8b
commit 5403237123

View file

@ -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)