mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 03:07:45 +00:00
Make sure skip_animations and start_at_animation_number play well together
This commit is contained in:
parent
b4ce0b910c
commit
98b0d266d2
2 changed files with 6 additions and 8 deletions
|
|
@ -302,9 +302,10 @@ def get_configuration(args):
|
|||
"file_writer_config": file_writer_config,
|
||||
"quiet": args.quiet or args.write_all,
|
||||
"write_all": args.write_all,
|
||||
"skip_animations": args.skip_animations,
|
||||
"start_at_animation_number": args.start_at_animation_number,
|
||||
"preview": not write_file,
|
||||
"end_at_animation_number": None,
|
||||
"preview": not write_file,
|
||||
"leave_progress_bars": args.leave_progress_bars,
|
||||
}
|
||||
|
||||
|
|
@ -334,10 +335,6 @@ def get_configuration(args):
|
|||
else:
|
||||
config["start_at_animation_number"] = int(stan)
|
||||
|
||||
config["skip_animations"] = any([
|
||||
args.skip_animations,
|
||||
args.start_at_animation_number,
|
||||
])
|
||||
return config
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ class Scene(object):
|
|||
self.time = 0
|
||||
self.skip_time = 0
|
||||
self.original_skipping_status = self.skip_animations
|
||||
if self.start_at_animation_number is not None:
|
||||
self.skip_animations = True
|
||||
|
||||
# Items associated with interaction
|
||||
self.mouse_point = Point()
|
||||
|
|
@ -277,9 +279,8 @@ class Scene(object):
|
|||
raise EndSceneEarlyException()
|
||||
|
||||
def stop_skipping(self):
|
||||
if self.skip_animations:
|
||||
self.skip_animations = False
|
||||
self.skip_time += self.time
|
||||
self.virtual_animation_start_time = self.time
|
||||
self.skip_animations = False
|
||||
|
||||
# Methods associated with running animations
|
||||
def get_time_progression(self, run_time, n_iterations=None, desc="", override_skip_animations=False):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue