Skip to content

Commit 3fb8fe2

Browse files
added digital naming when disable_caching
1 parent c5a0b1f commit 3fb8fe2

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

manim/scene/scene.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -886,12 +886,15 @@ def handle_caching_wait(func):
886886
named parameters affecting what was passed in *args e.g run_time, lag_ratio etc.
887887
"""
888888
def wrapper(self, duration=DEFAULT_WAIT_TIME, stop_condition=None):
889-
hash_wait = get_hash_from_wait_call(self.__dict__['camera'], duration, stop_condition, self.get_mobjects())
890-
self.play_hashes_list .append(hash_wait)
891-
if not file_writer_config['disable_caching'] and self.file_writer.is_already_cached(hash_wait):
892-
logger.info(f'Wait {self.num_plays} : Using cached data (hash : {hash_wait})')
893-
file_writer_config['skip_animations'] = True
889+
if not file_writer_config['disable_caching']:
890+
hash_wait = get_hash_from_wait_call(self.__dict__['camera'], duration, stop_condition, self.get_mobjects())
891+
self.play_hashes_list .append(hash_wait)
892+
if self.file_writer.is_already_cached(hash_wait):
893+
logger.info(f'Wait {self.num_plays} : Using cached data (hash : {hash_wait})')
894+
file_writer_config['skip_animations'] = True
894895
else :
896+
hash_play = "uncached_{:05}".format(self.num_plays)
897+
self.play_hashes_list.append(hash_play)
895898
self.revert_to_original_skipping_status()
896899
func(self, duration, stop_condition)
897900
return wrapper

0 commit comments

Comments
 (0)