From 511c1d3e39df9e67815e4a5a1dd24386a9fd48fe Mon Sep 17 00:00:00 2001 From: Nathan Date: Fri, 1 May 2026 13:52:33 -0600 Subject: [PATCH] WIP: adjust job type logic for flam 3.9 --- scripts/TalkingHeads Custom Render.js | 12 +++++++++++- scripts/TalkingHeads cycles_optix_gpu.js | 13 ++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/scripts/TalkingHeads Custom Render.js b/scripts/TalkingHeads Custom Render.js index efbe2ae..bd8b389 100644 --- a/scripts/TalkingHeads Custom Render.js +++ b/scripts/TalkingHeads Custom Render.js @@ -131,6 +131,15 @@ const ffmpegIncompatibleImageFormats = new Set([ // This is not supported by this job type. const videoFormats = ['FFMPEG', 'AVI_RAW', 'AVI_JPEG']; +// Align with Flamenco 3.9 simple_blender_render.js: overrides moved from add-on to job type. +const py_render_settings = ` +import bpy +r = bpy.context.scene.render +r.use_file_extension = True +r.use_overwrite = False +r.use_placeholder = False +`; + function compileJob(job) { print("Blender Render job submitted"); print("job: ", job); @@ -313,11 +322,12 @@ function authorRenderTasks(settings, renderDir, renderOutput) { argsBefore: [], blendfile: settings.blendfile, args: baseArgs.concat([ + "--python-expr", py_render_settings.trim().split("\n").join("; "), "--render-output", path.join(renderDir, path.basename(renderOutput)), "--render-format", settings.format, "--render-frame", chunk.replaceAll("-", ".."), // Convert to Blender frame range notation. ]) - }); + }, frameCount(chunk)); task.addCommand(command); renderTasks.push(task); } diff --git a/scripts/TalkingHeads cycles_optix_gpu.js b/scripts/TalkingHeads cycles_optix_gpu.js index 246f23a..939fd79 100644 --- a/scripts/TalkingHeads cycles_optix_gpu.js +++ b/scripts/TalkingHeads cycles_optix_gpu.js @@ -151,6 +151,15 @@ const ffmpegIncompatibleImageFormats = new Set([ // This is not supported by this job type. const videoFormats = ['FFMPEG', 'AVI_RAW', 'AVI_JPEG']; +// Align with Flamenco 3.9 simple_blender_render.js: overrides moved from add-on to job type. +const py_render_settings = ` +import bpy +r = bpy.context.scene.render +r.use_file_extension = True +r.use_overwrite = False +r.use_placeholder = False +`; + function compileJob(job) { print('Blender Render job submitted'); print('job: ', job); @@ -256,6 +265,8 @@ function authorRenderTasks(settings, renderDir, renderOutput) { enable_all_optix, '--python-expr', "import bpy; bpy.context.scene.cycles.device = 'GPU'", + '--python-expr', + py_render_settings.trim().split('\n').join('; '), '--render-output', path.join(renderDir, path.basename(renderOutput)), '--render-format', @@ -293,7 +304,7 @@ function authorRenderTasks(settings, renderDir, renderOutput) { '--render-frame', chunk.replaceAll('-', '..'), // Convert to Blender frame range notation. ]), - }); + }, frameCount(chunk)); task.addCommand(command); renderTasks.push(task); }