mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Don't show progress bar in embed by default
This commit is contained in:
parent
37f0bf8c11
commit
14cda7e908
1 changed files with 11 additions and 2 deletions
|
@ -195,7 +195,7 @@ class Scene(object):
|
||||||
def embed(
|
def embed(
|
||||||
self,
|
self,
|
||||||
close_scene_on_exit: bool = True,
|
close_scene_on_exit: bool = True,
|
||||||
show_animation_progress: bool = True,
|
show_animation_progress: bool = False,
|
||||||
) -> None:
|
) -> None:
|
||||||
if not self.preview:
|
if not self.preview:
|
||||||
return # Embed is only relevant with a preview
|
return # Embed is only relevant with a preview
|
||||||
|
@ -709,7 +709,12 @@ class Scene(object):
|
||||||
self.undo_stack.append(self.get_state())
|
self.undo_stack.append(self.get_state())
|
||||||
self.restore_state(self.redo_stack.pop())
|
self.restore_state(self.redo_stack.pop())
|
||||||
|
|
||||||
def checkpoint_paste(self, skip: bool = False, record: bool = False):
|
def checkpoint_paste(
|
||||||
|
self,
|
||||||
|
skip: bool = False,
|
||||||
|
record: bool = False,
|
||||||
|
progress_bar: bool = True
|
||||||
|
):
|
||||||
"""
|
"""
|
||||||
Used during interactive development to run (or re-run)
|
Used during interactive development to run (or re-run)
|
||||||
a block of scene code.
|
a block of scene code.
|
||||||
|
@ -736,6 +741,9 @@ class Scene(object):
|
||||||
prev_skipping = self.skip_animations
|
prev_skipping = self.skip_animations
|
||||||
self.skip_animations = skip
|
self.skip_animations = skip
|
||||||
|
|
||||||
|
prev_progress = self.show_animation_progress
|
||||||
|
self.show_animation_progress = progress_bar
|
||||||
|
|
||||||
if record:
|
if record:
|
||||||
self.camera.use_window_fbo(False)
|
self.camera.use_window_fbo(False)
|
||||||
self.file_writer.begin_insert()
|
self.file_writer.begin_insert()
|
||||||
|
@ -747,6 +755,7 @@ class Scene(object):
|
||||||
self.camera.use_window_fbo(True)
|
self.camera.use_window_fbo(True)
|
||||||
|
|
||||||
self.skip_animations = prev_skipping
|
self.skip_animations = prev_skipping
|
||||||
|
self.show_animation_progress = prev_progress
|
||||||
|
|
||||||
def checkpoint(self, key: str):
|
def checkpoint(self, key: str):
|
||||||
self.checkpoint_states[key] = self.get_state()
|
self.checkpoint_states[key] = self.get_state()
|
||||||
|
|
Loading…
Add table
Reference in a new issue