mirror of
https://github.com/3b1b/manim.git
synced 2025-08-31 23:58:32 +00:00
Minor reorganization of ReloadManager.retrieve_scenes_and_run
This commit is contained in:
parent
667cfaf160
commit
cd744024ea
2 changed files with 10 additions and 10 deletions
|
@ -22,8 +22,7 @@ def main():
|
|||
manimlib.utils.init_config.init_customization()
|
||||
return
|
||||
|
||||
reload_manager = ReloadManager(args)
|
||||
reload_manager.run()
|
||||
ReloadManager().run()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
@ -4,7 +4,7 @@ from typing import Any
|
|||
from IPython.terminal.embed import KillEmbedded
|
||||
|
||||
|
||||
import manimlib.config
|
||||
from manimlib.config import get_global_config
|
||||
import manimlib.extract_scene
|
||||
|
||||
from manimlib.window import Window
|
||||
|
@ -57,21 +57,22 @@ class ReloadManager:
|
|||
|
||||
def retrieve_scenes_and_run(self):
|
||||
"""
|
||||
Creates a new configuration based on the CLI args and runs the scenes.
|
||||
Take the global configuration, which is based on CLI arguments,
|
||||
modify it based on reloading status, then extract and run scenes
|
||||
accordingly
|
||||
"""
|
||||
# Args to Config
|
||||
scene_config = manimlib.config.get_scene_config()
|
||||
scene_config.update(reload_manager=self)
|
||||
global_config = get_global_config()
|
||||
scene_config = global_config["scene"]
|
||||
run_config = global_config["run"]
|
||||
|
||||
run_config = manimlib.config.get_run_config()
|
||||
scene_config.update(reload_manager=self)
|
||||
run_config.update(is_reload=self.is_reload)
|
||||
if self.embed_line:
|
||||
run_config.update(embed_line=self.embed_line)
|
||||
|
||||
# Create or reuse window
|
||||
if run_config["show_in_window"] and not self.window:
|
||||
window_config = manimlib.config.get_window_config()
|
||||
self.window = Window(**window_config)
|
||||
self.window = Window(**global_config["window"])
|
||||
scene_config.update(window=self.window)
|
||||
|
||||
# Scenes
|
||||
|
|
Loading…
Add table
Reference in a new issue