A community-maintained Python framework for creating mathematical animations.
Remove Scene.get_mobjects_from_last_animation()
Devin Neal0fd90747ed4b
diff --git a/manim/scene/scene.py b/manim/scene/scene.pyindex 73264db56..14f40bac0 100644--- a/manim/scene/scene.py+++ b/manim/scene/scene.py@@ -790,6 +790,7 @@ class Scene(Container):for animation in animations:animation.finish()animation.clean_up_from_scene(self)+ # TODO: This is only used in one place and should probably be removed.self.mobjects_from_last_animation = [anim.mobject for anim in animations]if file_writer_config["skip_animations"]:# TODO, run this call in for each animation?@@ -921,22 +922,6 @@ class Scene(Container):animation.clean_up_from_scene(self)return self- def get_mobjects_from_last_animation(self):- """- This method returns the mobjects from the previous- played animation, if any exist, and returns an empty- list if not.-- Returns- --------- list- The list of mobjects from the previous animation.-- """- if hasattr(self, "mobjects_from_last_animation"):- return self.mobjects_from_last_animation- return []-def get_wait_time_progression(self, duration, stop_condition):"""This method is used internally to obtain the CommandLinediff --git a/manim/scene/vector_space_scene.py b/manim/scene/vector_space_scene.pyindex c7b02491b..6e59ae5ca 100644--- a/manim/scene/vector_space_scene.py+++ b/manim/scene/vector_space_scene.py@@ -407,7 +407,7 @@ class VectorScene(Scene):),FadeOut(array.get_brackets()),)- y_coord, brackets = self.get_mobjects_from_last_animation()+ y_coord, brackets = self.mobjects_from_last_animationself.play(ShowCreation(y_line))self.play(ShowCreation(arrow))self.wait()