mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Add preview_frame_while_skipping option to scene config
This commit is contained in:
parent
82e24f8276
commit
c1b52bf572
2 changed files with 6 additions and 1 deletions
|
@ -64,6 +64,9 @@ file_writer:
|
|||
scene:
|
||||
show_animation_progress: False
|
||||
leave_progress_bars: False
|
||||
# When skipping animations, should a single frame be rendered
|
||||
# at the end of each play call?
|
||||
preview_while_skipping: True
|
||||
# How long does a scene pause on Scene.wait calls
|
||||
default_wait_time: 1.0
|
||||
vmobject:
|
||||
|
|
|
@ -77,6 +77,7 @@ class Scene(object):
|
|||
end_at_animation_number: int | None = None,
|
||||
show_animation_progress: bool = False,
|
||||
leave_progress_bars: bool = False,
|
||||
preview_while_skipping: bool = True,
|
||||
presenter_mode: bool = False,
|
||||
default_wait_time: float = 1.0,
|
||||
):
|
||||
|
@ -86,6 +87,7 @@ class Scene(object):
|
|||
self.end_at_animation_number = end_at_animation_number
|
||||
self.show_animation_progress = show_animation_progress
|
||||
self.leave_progress_bars = leave_progress_bars
|
||||
self.preview_while_skipping = preview_while_skipping
|
||||
self.presenter_mode = presenter_mode
|
||||
self.default_wait_time = default_wait_time
|
||||
|
||||
|
@ -531,7 +533,7 @@ class Scene(object):
|
|||
if not self.skip_animations:
|
||||
self.file_writer.end_animation()
|
||||
|
||||
if self.skip_animations and self.window is not None:
|
||||
if self.preview_while_skipping and self.skip_animations and self.window is not None:
|
||||
# Show some quick frames along the way
|
||||
self.update_frame(dt=0, force_draw=True)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue