fix: replay count

This commit is contained in:
Swann 2021-11-24 19:12:29 +01:00
parent 8000ce9931
commit 8d15e69b50

View File

@ -100,7 +100,13 @@ def set_log_level(self, value):
logging.getLogger().setLevel(value)
def set_active_replay(self, value):
max_index = len(bpy.context.window_manager.session.replay_files)-1
files_count = len(bpy.context.window_manager.session.replay_files)
if files_count == 0:
return
max_index = files_count-1
if value > max_index:
value = max_index