fix: resolve layout flow error and add fallback logic for AgX color management look enums
This commit is contained in:
15
operators.py
15
operators.py
@@ -116,7 +116,18 @@ class SCENERENDERER_OT_render_all(bpy.types.Operator):
|
|||||||
scene.view_settings.exposure = settings["exposure"]
|
scene.view_settings.exposure = settings["exposure"]
|
||||||
scene.cycles.film_exposure = 2.0 ** settings["exposure"]
|
scene.cycles.film_exposure = 2.0 ** settings["exposure"]
|
||||||
if settings["look"] != 'None':
|
if settings["look"] != 'None':
|
||||||
scene.view_settings.look = settings["look"]
|
target_look = settings["look"]
|
||||||
|
try:
|
||||||
|
scene.view_settings.look = target_look
|
||||||
|
except TypeError:
|
||||||
|
# Fallback for Blender 4.0+ AgX Color Management
|
||||||
|
agx_look = f"AgX - {target_look}"
|
||||||
|
if target_look == "Medium Contrast":
|
||||||
|
agx_look = "AgX - Base Contrast"
|
||||||
|
try:
|
||||||
|
scene.view_settings.look = agx_look
|
||||||
|
except TypeError:
|
||||||
|
print(f" [WARNING] Look '{target_look}' or '{agx_look}' not found, skipping look assignment.")
|
||||||
|
|
||||||
if settings["test_mode"]:
|
if settings["test_mode"]:
|
||||||
r.resolution_percentage = 10
|
r.resolution_percentage = 10
|
||||||
@@ -151,7 +162,7 @@ class SCENERENDERER_OT_render_all(bpy.types.Operator):
|
|||||||
|
|
||||||
layout.label(text=f"Ready to render {len(scenes)} scenes:", icon='RENDER_STILL')
|
layout.label(text=f"Ready to render {len(scenes)} scenes:", icon='RENDER_STILL')
|
||||||
box = layout.box()
|
box = layout.box()
|
||||||
col = box.column(flow=True)
|
col = box.column()
|
||||||
for s in scenes[:8]:
|
for s in scenes[:8]:
|
||||||
col.label(text=f" * {s}", icon='SCENE_DATA')
|
col.label(text=f" * {s}", icon='SCENE_DATA')
|
||||||
if len(scenes) > 8:
|
if len(scenes) > 8:
|
||||||
|
|||||||
Reference in New Issue
Block a user