Check if animation.mobject is in the full family of scene mobjects before adding

This commit is contained in:
Grant Sanderson 2024-12-06 08:51:08 -06:00
parent 09fb8d324e
commit 49c2b5cfe0

View file

@ -623,7 +623,7 @@ class Scene(object):
# animated mobjects that are in the family of
# those on screen, this can result in a restructuring
# of the scene.mobjects list, which is usually desired.
if animation.mobject not in self.mobjects:
if animation.mobject not in self.get_mobject_family_members():
self.add(animation.mobject)
def progress_through_animations(self, animations: Iterable[Animation]) -> None: