WIP: adjust job type logic for flam 3.9
This commit is contained in:
@@ -131,6 +131,15 @@ const ffmpegIncompatibleImageFormats = new Set([
|
|||||||
// This is not supported by this job type.
|
// This is not supported by this job type.
|
||||||
const videoFormats = ['FFMPEG', 'AVI_RAW', 'AVI_JPEG'];
|
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) {
|
function compileJob(job) {
|
||||||
print("Blender Render job submitted");
|
print("Blender Render job submitted");
|
||||||
print("job: ", job);
|
print("job: ", job);
|
||||||
@@ -313,11 +322,12 @@ function authorRenderTasks(settings, renderDir, renderOutput) {
|
|||||||
argsBefore: [],
|
argsBefore: [],
|
||||||
blendfile: settings.blendfile,
|
blendfile: settings.blendfile,
|
||||||
args: baseArgs.concat([
|
args: baseArgs.concat([
|
||||||
|
"--python-expr", py_render_settings.trim().split("\n").join("; "),
|
||||||
"--render-output", path.join(renderDir, path.basename(renderOutput)),
|
"--render-output", path.join(renderDir, path.basename(renderOutput)),
|
||||||
"--render-format", settings.format,
|
"--render-format", settings.format,
|
||||||
"--render-frame", chunk.replaceAll("-", ".."), // Convert to Blender frame range notation.
|
"--render-frame", chunk.replaceAll("-", ".."), // Convert to Blender frame range notation.
|
||||||
])
|
])
|
||||||
});
|
}, frameCount(chunk));
|
||||||
task.addCommand(command);
|
task.addCommand(command);
|
||||||
renderTasks.push(task);
|
renderTasks.push(task);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -151,6 +151,15 @@ const ffmpegIncompatibleImageFormats = new Set([
|
|||||||
// This is not supported by this job type.
|
// This is not supported by this job type.
|
||||||
const videoFormats = ['FFMPEG', 'AVI_RAW', 'AVI_JPEG'];
|
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) {
|
function compileJob(job) {
|
||||||
print('Blender Render job submitted');
|
print('Blender Render job submitted');
|
||||||
print('job: ', job);
|
print('job: ', job);
|
||||||
@@ -256,6 +265,8 @@ function authorRenderTasks(settings, renderDir, renderOutput) {
|
|||||||
enable_all_optix,
|
enable_all_optix,
|
||||||
'--python-expr',
|
'--python-expr',
|
||||||
"import bpy; bpy.context.scene.cycles.device = 'GPU'",
|
"import bpy; bpy.context.scene.cycles.device = 'GPU'",
|
||||||
|
'--python-expr',
|
||||||
|
py_render_settings.trim().split('\n').join('; '),
|
||||||
'--render-output',
|
'--render-output',
|
||||||
path.join(renderDir, path.basename(renderOutput)),
|
path.join(renderDir, path.basename(renderOutput)),
|
||||||
'--render-format',
|
'--render-format',
|
||||||
@@ -293,7 +304,7 @@ function authorRenderTasks(settings, renderDir, renderOutput) {
|
|||||||
'--render-frame',
|
'--render-frame',
|
||||||
chunk.replaceAll('-', '..'), // Convert to Blender frame range notation.
|
chunk.replaceAll('-', '..'), // Convert to Blender frame range notation.
|
||||||
]),
|
]),
|
||||||
});
|
}, frameCount(chunk));
|
||||||
task.addCommand(command);
|
task.addCommand(command);
|
||||||
renderTasks.push(task);
|
renderTasks.push(task);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user