WIP: Initial version of a single-frame job compiler #104189

Closed
k8ie wants to merge 26 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 87581ebdb4 - Show all commits

View File

@ -97,7 +97,6 @@ function authorRenderTasks(settings, renderDir, renderOutput) {
let pythonExpression = `
import bpy
render = bpy.context.scene.render
render.engine = 'CYCLES'
render.use_compositing = False
bpy.context.scene.cycles.use_denoising = False
render.image_settings.file_format = 'OPEN_EXR_MULTILAYER'
@ -133,7 +132,6 @@ for layer in bpy.context.scene.view_layers:
function authorCreateMergeTask(settings, renderOutput) {
const task = author.Task(`merge`, "blender");
let pythonExpression = `
import os
import pathlib
import bpy
import math
@ -143,12 +141,12 @@ def normalize(number):
basepath = "${renderOutput}/"
renders = basepath + "tiles/"
filenames = [f for f in os.listdir(renders) if os.path.isfile(renders + f)]
filenames = list(pathlib.Path(renders).iterdir())
if len(filenames) <= 1:
print('This job only has one file, merging not required.')
print('Moving ' + renders + filenames[0] + ' to ' + basepath + 'MERGED.exr')
pathlib.Path(renders + filenames[0]).rename(basepath + 'MERGED.exr')
print('Moving ' + renders + filenames[0].name + ' to ' + basepath + 'MERGED.exr')
pathlib.Path(renders + filenames[0].name).rename(basepath + 'MERGED.exr')
exit()
row_max = math.ceil(100 / ${settings.tile_size}) - 1
@ -187,9 +185,9 @@ def align_tiles(input):
# Create a list of image nodes
image_nodes = []
for index, image in enumerate(filenames):
bpy.ops.image.open(filepath=renders + image, use_sequence_detection=False)
image = bpy.data.images[bpy.path.basename(image)]
for index, file in enumerate(filenames):
bpy.ops.image.open(filepath=renders + file.name, use_sequence_detection=False)
image = bpy.data.images[bpy.path.basename(file.name)]
image_nodes.append(bpy.context.scene.node_tree.nodes.new(type='CompositorNodeImage'))
image_nodes[index].image = image