mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Clear later checkpoints
This commit is contained in:
parent
602fbd1a9f
commit
4a8e8e5447
1 changed files with 5 additions and 0 deletions
|
@ -754,6 +754,11 @@ class Scene(object):
|
|||
if key not in self.checkpoint_states:
|
||||
log.error(f"No checkpoint at {key}")
|
||||
return
|
||||
all_keys = list(self.checkpoint_states.keys())
|
||||
index = all_keys.index(key)
|
||||
for later_key in all_keys[index + 1:]:
|
||||
self.checkpoint_states.pop(later_key)
|
||||
|
||||
self.restore_state(self.checkpoint_states[key])
|
||||
|
||||
def clear_checkpoints(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue