mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Allow for customizable exception display mode with Scene.embed
This commit is contained in:
parent
4e014d7a8f
commit
cba101995f
3 changed files with 6 additions and 0 deletions
|
@ -491,4 +491,5 @@ def get_configuration(args: Namespace) -> dict:
|
|||
"presenter_mode": args.presenter_mode,
|
||||
"leave_progress_bars": args.leave_progress_bars,
|
||||
"show_animation_progress": args.show_animation_progress,
|
||||
"embed_exception_mode": custom_config["embed_exception_mode"],
|
||||
}
|
||||
|
|
|
@ -42,3 +42,4 @@ camera_resolutions:
|
|||
4k: "3840x2160"
|
||||
default_resolution: "high"
|
||||
fps: 30
|
||||
embed_exception_mode: "Verbose"
|
||||
|
|
|
@ -74,6 +74,7 @@ class Scene(object):
|
|||
preview: bool = True,
|
||||
presenter_mode: bool = False,
|
||||
show_animation_progress: bool = False,
|
||||
embed_exception_mode = "",
|
||||
):
|
||||
self.skip_animations = skip_animations
|
||||
self.always_update_mobjects = always_update_mobjects
|
||||
|
@ -83,6 +84,7 @@ class Scene(object):
|
|||
self.preview = preview
|
||||
self.presenter_mode = presenter_mode
|
||||
self.show_animation_progress = show_animation_progress
|
||||
self.embed_exception_mode = embed_exception_mode
|
||||
|
||||
self.camera_config = {**self.default_camera_config, **camera_config}
|
||||
self.window_config = {**self.default_window_config, **window_config}
|
||||
|
@ -249,6 +251,8 @@ class Scene(object):
|
|||
|
||||
shell.events.register("post_run_cell", post_cell_func)
|
||||
|
||||
shell.magic(f"xmode {self.embed_exception_mode}")
|
||||
|
||||
# Launch shell
|
||||
shell(
|
||||
local_ns=local_ns,
|
||||
|
|
Loading…
Add table
Reference in a new issue