Skip to content

Commit 0fd9074

Browse files
committed
Remove Scene.get_mobjects_from_last_animation()
1 parent 2555bc7 commit 0fd9074

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

manim/scene/scene.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,7 @@ def finish_animations(self, animations):
790790
for animation in animations:
791791
animation.finish()
792792
animation.clean_up_from_scene(self)
793+
# TODO: This is only used in one place and should probably be removed.
793794
self.mobjects_from_last_animation = [anim.mobject for anim in animations]
794795
if file_writer_config["skip_animations"]:
795796
# TODO, run this call in for each animation?
@@ -921,22 +922,6 @@ def clean_up_animations(self, *animations):
921922
animation.clean_up_from_scene(self)
922923
return self
923924

924-
def get_mobjects_from_last_animation(self):
925-
"""
926-
This method returns the mobjects from the previous
927-
played animation, if any exist, and returns an empty
928-
list if not.
929-
930-
Returns
931-
--------
932-
list
933-
The list of mobjects from the previous animation.
934-
935-
"""
936-
if hasattr(self, "mobjects_from_last_animation"):
937-
return self.mobjects_from_last_animation
938-
return []
939-
940925
def get_wait_time_progression(self, duration, stop_condition):
941926
"""
942927
This method is used internally to obtain the CommandLine

manim/scene/vector_space_scene.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ def coords_to_vector(self, vector, coords_start=2 * RIGHT + 2 * UP, clean_up=Tru
407407
),
408408
FadeOut(array.get_brackets()),
409409
)
410-
y_coord, brackets = self.get_mobjects_from_last_animation()
410+
y_coord, brackets = self.mobjects_from_last_animation
411411
self.play(ShowCreation(y_line))
412412
self.play(ShowCreation(arrow))
413413
self.wait()

0 commit comments

Comments
 (0)