Scene Manager: named LODs
{lod} in SCENE_MANAGER_LOD_COLLECTION now matches any name (COL_bob_LODhigh
as well as COL_bob_LOD0). SCENE_MANAGER_LODS (high, mid, low) sets the
button order and the LOD shown on load; unlisted LODs follow, numbers in
order, then names A-Z. It replaces SCENE_MANAGER_DEFAULT_LOD. The LOD of
Selected buttons get their own line.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bac7a6f5da
commit
6ec2b228ae
8 files changed
+80
-61
No files matched your search
+10
-9
@@ -488,9 +488,9 @@ class _SceneLoadedPanel:
|
||||
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
|
||||
for name in lods:
|
||||
op = sub.operator(sm.WTD_OT_scene_set_lod.bl_idname, text=name, depress=name == current)
|
||||
op.lod, op.library, op.instance = name, library.name, instance.name
|
||||
|
||||
layout.separator()
|
||||
row = layout.row(align=True)
|
||||
@@ -502,13 +502,14 @@ class _SceneLoadedPanel:
|
||||
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)
|
||||
col = layout.column(align=True)
|
||||
col.label(text="LOD of Selected")
|
||||
row = col.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
|
||||
names = {name for library, instance in selected for name in sm_library.lods(library, instance)}
|
||||
for name in sorted(names, key=sm_library.lod_order):
|
||||
op = row.operator(sm.WTD_OT_scene_set_lod.bl_idname, text=name, depress=shown == {name})
|
||||
op.lod, op.selected = name, True
|
||||
|
||||
|
||||
class _SceneAssetizePanel:
|
||||
|
||||
Reference in new issue
Block a user