Scene Manager: LOD switching; Shot Viewer renamed Shot Manager

LODs are child collections of the asset collection (COL_{asset}_LOD{n}).
Overrides hide the other LOD collections (viewport and render), keeping
the rig, pose and animation; collection instances instance the LOD
collection. Each instance has its own LOD, set per instance or for the
selection in the Loaded panel, kept through save, reload and updates.
Loading shows SCENE_MANAGER_DEFAULT_LOD (0).

The Shot Viewer panel is now "Shot Manager" and starts closed. Code
names and SHOT_VIEWER_* config keys are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
NDemaerschalkandClaude Opus 5.5 committed 2026-10-27 16:42:24 +01:00
1 parent 9fe38ce58a
commit bac7a6f5da
10 files changed
+258 -45

No files matched your search

+23 -1
View File
@@ -278,7 +278,8 @@ class WTD_UL_shots(bpy.types.UIList):
class _ShotViewerPanel:
bl_region_type = "UI"
bl_category = "WTD"
bl_label = "Shot Viewer"
bl_label = "Shot Manager"
bl_options = {"DEFAULT_CLOSED"} # panel starts collapsed
def draw(self, context) -> None:
layout = self.layout
@@ -482,11 +483,32 @@ class _SceneLoadedPanel:
op = sub.operator(sm.WTD_OT_scene_select_instance.bl_idname, text="", icon="RESTRICT_SELECT_OFF")
op.library, op.instance = library.name, instance.name
sub.operator(sm.WTD_OT_scene_remove.bl_idname, text="", icon="X").instance = instance.name
lods = sm_library.lods(library, instance)
if lods:
current = sm_library.current_lod(library, instance)
sub = col.row(align=True)
sub.label(text="LOD", icon="BLANK1")
for number in lods:
op = sub.operator(sm.WTD_OT_scene_set_lod.bl_idname, text=str(number), depress=number == current)
op.lod, op.library, op.instance = number, library.name, instance.name
layout.separator()
row = layout.row(align=True)
row.operator(sm.WTD_OT_scene_update.bl_idname, text="Update Selected").selected = True
row.operator(sm.WTD_OT_scene_remove.bl_idname, text="Remove Selected").selected = True
selected = [
(library, instance)
for library, instance in sm_library.selected_instances(context.view_layer)
if sm_library.lods(library, instance)
]
if selected:
split = layout.split(factor=0.4, align=True)
split.label(text="Selected LOD")
row = split.row(align=True)
shown = {sm_library.current_lod(library, instance) for library, instance in selected}
for number in sorted({n for library, instance in selected for n in sm_library.lods(library, instance)}):
op = row.operator(sm.WTD_OT_scene_set_lod.bl_idname, text=str(number), depress=shown == {number})
op.lod, op.selected = number, True
class _SceneAssetizePanel: