WIP: Single-frame job compiler #104194

Draft
k8ie wants to merge 30 commits from k8ie/flamenco:single-frame into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Showing only changes of commit 46456b4f53 - Show all commits

View File

@ -213,12 +213,12 @@ for index, node in enumerate(combined_translates):
if denoising: if denoising:
albedo_mix_nodes.append(bpy.context.scene.node_tree.nodes.new(type='CompositorNodeMixRGB')) albedo_mix_nodes.append(bpy.context.scene.node_tree.nodes.new(type='CompositorNodeMixRGB'))
albedo_mix_nodes[index].blend_type = 'ADD' albedo_mix_nodes[index].blend_type = 'ADD'
bpy.context.scene.node_tree.links.new(combined_translates[0].outputs['Denoising Albedo'], albedo_mix_nodes[index].inputs[1]) bpy.context.scene.node_tree.links.new(albedo_translates[0].outputs['Image'], albedo_mix_nodes[index].inputs[1])
bpy.context.scene.node_tree.links.new(combined_translates[1].outputs['Denoising Albedo'], albedo_mix_nodes[index].inputs[2]) bpy.context.scene.node_tree.links.new(albedo_translates[1].outputs['Image'], albedo_mix_nodes[index].inputs[2])
normal_mix_nodes.append(bpy.context.scene.node_tree.nodes.new(type='CompositorNodeMixRGB')) normal_mix_nodes.append(bpy.context.scene.node_tree.nodes.new(type='CompositorNodeMixRGB'))
normal_mix_nodes[index].blend_type = 'ADD' normal_mix_nodes[index].blend_type = 'ADD'
bpy.context.scene.node_tree.links.new(combined_translates[0].outputs['Denoising Normal'], normal_mix_nodes[index].inputs[1]) bpy.context.scene.node_tree.links.new(normal_translates[0].outputs['Image'], normal_mix_nodes[index].inputs[1])
bpy.context.scene.node_tree.links.new(combined_translates[1].outputs['Denoising Normal'], normal_mix_nodes[index].inputs[2]) bpy.context.scene.node_tree.links.new(normal_translates[1].outputs['Image'], normal_mix_nodes[index].inputs[2])
else: else:
# Take one image node and the previous alpha over node # Take one image node and the previous alpha over node
alpha_over_nodes.append(bpy.context.scene.node_tree.nodes.new(type='CompositorNodeAlphaOver')) alpha_over_nodes.append(bpy.context.scene.node_tree.nodes.new(type='CompositorNodeAlphaOver'))
@ -228,11 +228,11 @@ for index, node in enumerate(combined_translates):
albedo_mix_nodes.append(bpy.context.scene.node_tree.nodes.new(type='CompositorNodeMixRGB')) albedo_mix_nodes.append(bpy.context.scene.node_tree.nodes.new(type='CompositorNodeMixRGB'))
albedo_mix_nodes[index].blend_type = 'ADD' albedo_mix_nodes[index].blend_type = 'ADD'
bpy.context.scene.node_tree.links.new(albedo_mix_nodes[index-1].outputs['Image'], albedo_mix_nodes[index].inputs[1]) bpy.context.scene.node_tree.links.new(albedo_mix_nodes[index-1].outputs['Image'], albedo_mix_nodes[index].inputs[1])
bpy.context.scene.node_tree.links.new(combined_translates[index+1].outputs['Denoising Albedo'], albedo_mix_nodes[index].inputs[2]) bpy.context.scene.node_tree.links.new(albedo_translates[index+1].outputs['Image'], albedo_mix_nodes[index].inputs[2])
normal_mix_nodes.append(bpy.context.scene.node_tree.nodes.new(type='CompositorNodeMixRGB')) normal_mix_nodes.append(bpy.context.scene.node_tree.nodes.new(type='CompositorNodeMixRGB'))
normal_mix_nodes[index].blend_type = 'ADD' normal_mix_nodes[index].blend_type = 'ADD'
bpy.context.scene.node_tree.links.new(normal_mix_nodes[index-1].outputs['Image'], normal_mix_nodes[index].inputs[1]) bpy.context.scene.node_tree.links.new(normal_mix_nodes[index-1].outputs['Image'], normal_mix_nodes[index].inputs[1])
bpy.context.scene.node_tree.links.new(combined_translates[index+1].outputs['Denoising Normal'], normal_mix_nodes[index].inputs[2]) bpy.context.scene.node_tree.links.new(normal_translates[index+1].outputs['Image'], normal_mix_nodes[index].inputs[2])
if index + 1 == len(combined_translates) - 1: if index + 1 == len(combined_translates) - 1:
if denoising: if denoising:
denoise_node = bpy.context.scene.node_tree.nodes.new(type='CompositorNodeDenoise') denoise_node = bpy.context.scene.node_tree.nodes.new(type='CompositorNodeDenoise')