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 45afa79447 - Show all commits

View File

@ -8,8 +8,6 @@ const JOB_TYPE = {
description: "Frame to render"}, description: "Frame to render"},
{ key: "chunk_size", type: "int32", default: 128, propargs: {min: 1}, description: "Number of samples to render in one Blender render task", { key: "chunk_size", type: "int32", default: 128, propargs: {min: 1}, description: "Number of samples to render in one Blender render task",
visible: "submission" }, visible: "submission" },
{ key: "denoising", type: "bool", required: true, default: false,
description: "Toggles OpenImageDenoise" },
// render_output_root + add_path_components determine the value of render_output_path. // render_output_root + add_path_components determine the value of render_output_path.
@ -24,7 +22,9 @@ const JOB_TYPE = {
// Automatically evaluated settings: // Automatically evaluated settings:
{ key: "blendfile", type: "string", required: true, description: "Path of the Blend file to render", visible: "web" }, { key: "blendfile", type: "string", required: true, description: "Path of the Blend file to render", visible: "web" },
{ key: "format", type: "string", required: true, eval: "C.scene.render.image_settings.file_format", visible: "web" }, { key: "format", type: "string", required: true, eval: "C.scene.render.image_settings.file_format", visible: "web" },
{ key: "uses_compositing", type: "bool", required: true, eval: "C.scene.use_nodes and C.scene.render.use_compositing", visible: "web" }, { key: "compositing", type: "bool", required: true, eval: "C.scene.use_nodes and C.scene.render.use_compositing", visible: "web" },
{ key: "denoising", type: "bool", required: true, eval: "C.scene.cycles.use_denoising", visible: "web",
description: "Toggles OpenImageDenoise" },
{ key: "image_file_extension", type: "string", required: true, eval: "C.scene.render.file_extension", visible: "hidden", { key: "image_file_extension", type: "string", required: true, eval: "C.scene.render.file_extension", visible: "hidden",
description: "File extension used for the final export" }, description: "File extension used for the final export" },
{ key: "samples", type: "string", required: true, eval: "f'1-{C.scene.cycles.samples}'", visible: "web", { key: "samples", type: "string", required: true, eval: "f'1-{C.scene.cycles.samples}'", visible: "web",
@ -223,7 +223,7 @@ import bpy
C = bpy.context C = bpy.context
basepath = "${renderOutput}/" basepath = "${renderOutput}/"
filename = "${filename}"`; filename = "${filename}"`;
if (settings.uses_compositing) { if (settings.compositing) {
// Do the full composite+export pipeline // Do the full composite+export pipeline
// uses snippets from // uses snippets from
// https://github.com/state-of-the-art/BlendNet/blob/master/BlendNet/script-compose.py#L94 // https://github.com/state-of-the-art/BlendNet/blob/master/BlendNet/script-compose.py#L94