WIP: Initial version of a single-frame job compiler #104189
@ -22,8 +22,8 @@ const JOB_TYPE = {
|
||||
// Automatically evaluated settings:
|
||||
{ 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: "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",
|
||||
{ key: "use_compositing", type: "bool", required: true, eval: "C.scene.use_nodes and C.scene.render.use_compositing", visible: "web" },
|
||||
{ key: "use_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",
|
||||
description: "File extension used for the final export" },
|
||||
@ -112,7 +112,7 @@ bpy.context.scene.cycles.use_denoising = False
|
||||
bpy.context.scene.render.image_settings.file_format = 'OPEN_EXR_MULTILAYER'
|
||||
bpy.context.scene.cycles.samples = ${chunk_size}
|
||||
bpy.context.scene.cycles.sample_offset = ${chunk_start}`;
|
||||
if (settings.denoising) {
|
||||
if (settings.use_denoising) {
|
||||
pythonExpression += `
|
||||
for layer in bpy.context.scene.view_layers:
|
||||
layer['cycles']['denoising_store_passes'] = 1
|
||||
@ -187,7 +187,7 @@ pathlib.Path(tmp + str(index-1)+'.exr').rename(basepath + 'MERGED.exr')`;
|
||||
}
|
||||
|
||||
function authorCreateDenoiseTask(settings, renderOutput) {
|
||||
if (! settings.denoising) {
|
||||
if (! settings.use_denoising) {
|
||||
return;
|
||||
}
|
||||
const task = author.Task(`denoise`, "blender");
|
||||
@ -211,7 +211,7 @@ bpy.ops.cycles.denoise_animation(input_filepath="${renderOutput}/MERGED.exr", ou
|
||||
|
||||
function authorCreateCompositeTask(settings, renderOutput) {
|
||||
let filename;
|
||||
if (settings.denoising) {
|
||||
if (settings.use_denoising) {
|
||||
filename = "DENOISED.exr";
|
||||
}
|
||||
else {
|
||||
@ -223,7 +223,7 @@ import bpy
|
||||
C = bpy.context
|
||||
basepath = "${renderOutput}/"
|
||||
filename = "${filename}"`;
|
||||
if (settings.compositing) {
|
||||
if (settings.use_compositing) {
|
||||
// Do the full composite+export pipeline
|
||||
// uses snippets from
|
||||
// https://github.com/state-of-the-art/BlendNet/blob/master/BlendNet/script-compose.py#L94
|
||||
|
Loading…
Reference in New Issue
Block a user