Update for Blender 5.2

- use new api compositor access
- Fix file output nodes connexion/renumber/rename/slots handlibng
- consider the new output types
- fixes node position with new API
- fix errors with handler

LLM assisted update
This commit is contained in:
Pullusb
2026-09-29 18:57:26 +02:00
parent 02aa67fc26
commit d650ec8c98
12 changed files with 295 additions and 179 deletions
+13 -9
View File
@@ -68,14 +68,15 @@ class RT_PT_render_toolbox_ui(Panel):
col.prop(scn.render, 'resolution_percentage', text="Resolution Percentage")
percent = scn.render.resolution_percentage
col.label(text=f"{int(scn.render.resolution_x * percent / 100)}x{int(scn.render.resolution_y * percent / 100)}", icon='INFO')
if cam and cam.data.shift_x != 0 or cam.data.shift_y != 0:
if cam and (cam.data.shift_x != 0 or cam.data.shift_y != 0):
col.label(text='Camera has Shift', icon='INFO')
# col.prop(cam.data, 'shift_x', text="Shift X")
# col.prop(cam.data, 'shift_y', text="Shift Y")
## viewlayer section
layout.label(text='View layers:')
ct = len([n for n in context.scene.node_tree.nodes if n.type == 'R_LAYERS' and n.select])
tree = fn.get_compositor_tree(scn)
ct = len([n for n in tree.nodes if n.type == 'R_LAYERS' and n.select]) if tree else 0
# col = layout.column(align=True)
# row=col.row(align=True)
@@ -109,13 +110,18 @@ class RT_PT_file_output_ui(bpy.types.Panel):
def draw(self, context):
layout = self.layout
tree = fn.get_compositor_tree(context.scene)
if tree is None:
layout.label(text='Scene has no compositing node group', icon='INFO')
return
col = layout.column()
col.operator("rt.create_output_layers", text='Create File Output', icon="NODE")
col.operator("rt.outputs_search_and_replace", text='Search And Replace Outputs', icon="BORDERMOVE")
col.separator()
col.operator('rt.set_output_node_format', icon='OUTPUT', text='Copy Output Format To Selected')
col.operator('rt.set_active_file_output_slot_to_composite', icon='OUTPUT', text='Active Slot To Composite')
col.operator('rt.set_active_file_output_slot_to_composite', icon='OUTPUT', text='Active Item To Composite')
layout.label(text='All Outputs:')
@@ -123,17 +129,15 @@ class RT_PT_file_output_ui(bpy.types.Panel):
row.operator('rt.mute_toggle_output_nodes', icon='NODE_INSERT_ON', text='Mute').mute = True
row.operator('rt.mute_toggle_output_nodes', icon='NODE_INSERT_OFF', text='Unmute').mute = False
scn = context.scene
disabled_output = [n for n in scn.node_tree.nodes if n.type == 'OUTPUT_FILE' and n.mute]
disabled_output = [n for n in tree.nodes if n.type == 'OUTPUT_FILE' and n.mute]
if disabled_output:
output_ct = len([n for n in scn.node_tree.nodes if n.type == 'OUTPUT_FILE'])
output_ct = len([n for n in tree.nodes if n.type == 'OUTPUT_FILE'])
layout.label(text=f'{len(disabled_output)}/{output_ct} Output Muted', icon='INFO')
col = layout.column()
## (re)number exports
ct = len([n for n in context.scene.node_tree.nodes if n.type == 'OUTPUT_FILE' and n.select])
ct = len([n for n in tree.nodes if n.type == 'OUTPUT_FILE' and n.select])
txt = f'Renumber {ct} Selected Outputs'
subcol = col.column()
subcol.enabled = bool(ct)