mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 06:47:51 +00:00
Fixed bits of funny behavior with skip_animations
This commit is contained in:
parent
6ff937e893
commit
1d09e5e960
1 changed files with 4 additions and 1 deletions
|
|
@ -53,6 +53,7 @@ class Scene(Container):
|
|||
self.shared_locals = {}
|
||||
self.frame_num = 0
|
||||
self.current_scene_time = 0
|
||||
self.original_skipping_status = self.skip_animations
|
||||
if self.name is None:
|
||||
self.name = self.__class__.__name__
|
||||
if self.include_render_quality_in_name:
|
||||
|
|
@ -424,7 +425,7 @@ class Scene(Container):
|
|||
def handle_animation_skipping(self):
|
||||
if self.start_at_animation_number:
|
||||
if self.num_plays == self.start_at_animation_number:
|
||||
self.skip_animations = self.original_skipping_status
|
||||
self.skip_animations = False
|
||||
if self.end_at_animation_number:
|
||||
if self.num_plays >= self.end_at_animation_number:
|
||||
self.skip_animations = True
|
||||
|
|
@ -511,6 +512,8 @@ class Scene(Container):
|
|||
return self
|
||||
|
||||
def add_frames(self, *frames):
|
||||
if self.skip_animations:
|
||||
return
|
||||
self.current_scene_time += len(frames)*self.frame_duration
|
||||
if self.write_to_movie:
|
||||
for frame in frames:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue