No real need to track ReloadManager.scenes

This was to be able to loop through an tear them down, but tear down is primarily about ending any file writing, and potentially cleaning up a window, which for the sake of reusing a window we don't want to do anyway.
This commit is contained in:
Grant Sanderson 2024-12-09 16:46:13 -06:00
parent dd508b8cfc
commit 8706ba1589

View file

@ -25,7 +25,6 @@ class ReloadManager:
command in the IPython shell.
"""
scenes: list[Any] = []
window = None
is_reload = False
@ -50,10 +49,6 @@ class ReloadManager:
except KillEmbedded:
# Requested via the `exit_raise` IPython runline magic
# by means of our scene.reload() command
for scene in self.scenes:
scene.tear_down()
self.scenes = []
self.note_reload()
except KeyboardInterrupt:
break
@ -83,9 +78,9 @@ class ReloadManager:
scene_config.update(window=self.window)
# Scenes
self.scenes = manimlib.extract_scene.main(scene_config, run_config)
if len(self.scenes) == 0:
scenes = manimlib.extract_scene.main(scene_config, run_config)
if len(scenes) == 0:
print("No scenes found to run")
for scene in self.scenes:
for scene in scenes:
scene.run()