refactor and fixes for episode handling gav

This commit is contained in:
2026-09-01 15:44:11 +02:00
parent 01fccc63d9
commit 4e29c0e699
7 changed files with 448 additions and 164 deletions
+17
View File
@@ -64,6 +64,18 @@ def load_trackers():
print(e)
def _load_settings_after_startup():
"""Apply the config once Blender has a normal context available."""
if not getattr(bpy.context, 'scene', None):
return 0.5
try:
bpy.ops.vse_toolbox.load_settings()
except RuntimeError as e:
print(f'Could not load VSE Toolbox settings at startup: {e}')
return None
def load_prefs():
prefs = get_addon_prefs()
prefs_config_file = prefs.config_path
@@ -97,6 +109,11 @@ def load_prefs():
except AttributeError:
pass # Scene not available yet during register()
# Loading preferences only sets the config path and tracker credentials;
# apply the project configuration once Blender has finished registering
# and provides a normal context (register() uses _RestrictContext).
bpy.app.timers.register(_load_settings_after_startup, first_interval=0.1)
class Trackers(PropertyGroup):
def __iter__(self):