Skip to content

Commit

Permalink
Fix 3D overlap when animating by checking Mobject family members recu…
Browse files Browse the repository at this point in the history
…rsively instead of `self.mobjects` (#2254)

* Add Animation.setup_scene method to make Animation more customizable

* Remove Animation.setup_scene method and let scene check all mobject family members
  • Loading branch information
MathItYT authored Dec 7, 2024
1 parent 6196daa commit df1e067
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion manimlib/scene/scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ def begin_animations(self, animations: Iterable[Animation]) -> None:
# 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:
Expand Down

0 comments on commit df1e067

Please sign in to comment.