Use job name instead of blend name for render output paths

This commit is contained in:
Nathan
2026-03-06 16:00:57 -07:00
parent fff57d2b73
commit 9005e18438
4 changed files with 459 additions and 425 deletions
+6 -6
View File
@@ -72,7 +72,7 @@ const JOB_TYPE = {
type: "string",
subtype: "file_path",
editable: false,
eval: "((lambda Path, abspath, os_path, settings_obj, blend: str(Path(abspath(settings_obj.render_output_root or '//')) / (((str(settings_obj.submodule or '').strip()) if (settings_obj.use_submodule and str(settings_obj.submodule or '').strip()) else ((os_path.basename(os_path.dirname(bpy.data.filepath))) if settings_obj.use_submodule else ''))) / blend / (blend + '_######')))(__import__('pathlib').Path, __import__('os').path.abspath, __import__('os').path, settings, __import__('os').path.splitext(__import__('os').path.basename(bpy.data.filepath))[0]))",
eval: "((lambda Path, abspath, os_path, settings_obj, jobname: str(Path(abspath(settings_obj.render_output_root or '//')) / (((str(settings_obj.submodule or '').strip()) if (settings_obj.use_submodule and str(settings_obj.submodule or '').strip()) else ((os_path.basename(os_path.dirname(bpy.data.filepath))) if settings_obj.use_submodule else ''))) / jobname / (jobname + '_######')))(__import__('pathlib').Path, __import__('os').path.abspath, __import__('os').path, settings, (job.name if 'job' in dir() and job and job.name else __import__('os').path.splitext(__import__('os').path.basename(bpy.data.filepath))[0])))",
description: "Final file path of where render output will be saved"
},
@@ -204,17 +204,17 @@ function computeAutoRenderOutputPath(job) {
renderRoot = path.join(path.dirname(settings.blendfile), 'Renders');
}
const blendname = path.stem(settings.blendfile).replace('.flamenco', '');
const jobname = (job.name || path.stem(settings.blendfile).replace('.flamenco', '')).trim();
print('AutoPath: blendfile=', settings.blendfile);
print('AutoPath: projectRoot=', projectRoot);
print('AutoPath: renderRoot=', renderRoot);
print('AutoPath: submodule=', submodule);
print('AutoPath: blendname=', blendname);
print('AutoPath: jobname=', jobname);
const parts = [renderRoot];
if (submodule) parts.push(submodule);
parts.push(blendname, `${blendname}_######`);
parts.push(jobname, `${jobname}_######`);
const finalPath = path.join.apply(path, parts);
print('AutoPath: finalPath=', finalPath);
return finalPath;
@@ -344,8 +344,8 @@ function authorCreateVideoTask(settings, renderDir) {
frames = `${firstFrame}-${lastFrame}`;
}
const stem = path.stem(settings.blendfile).replace('.flamenco', '');
const outfile = path.join(renderDir, `${stem}-${frames}.mp4`);
const jobname = path.basename(renderDir);
const outfile = path.join(renderDir, `${jobname}-${frames}.mp4`);
const outfileExt = needsPreviews ? ".jpg" : settings.image_file_extension;
const task = author.Task('preview-video', 'ffmpeg');
+6 -6
View File
@@ -56,13 +56,13 @@ const JOB_TYPE = {
description:
"Optional submodule under Renders (e.g. 'Waterspider B'). If empty, omitted.",
},
{
{
key: 'render_output_path',
type: 'string',
subtype: 'file_path',
editable: false,
eval:
"((lambda Path, abspath, os_path, settings_obj, blend: str(Path(abspath(settings_obj.render_output_root or '//')) / (((str(settings_obj.submodule or '').strip()) if (settings_obj.use_submodule and str(settings_obj.submodule or '').strip()) else ((os_path.basename(os_path.dirname(bpy.data.filepath))) if settings_obj.use_submodule else ''))) / blend / (blend + '_######')))(__import__('pathlib').Path, __import__('os').path.abspath, __import__('os').path, settings, __import__('os').path.splitext(__import__('os').path.basename(bpy.data.filepath))[0]))",
"((lambda Path, abspath, os_path, settings_obj, jobname: str(Path(abspath(settings_obj.render_output_root or '//')) / (((str(settings_obj.submodule or '').strip()) if (settings_obj.use_submodule and str(settings_obj.submodule or '').strip()) else ((os_path.basename(os_path.dirname(bpy.data.filepath))) if settings_obj.use_submodule else ''))) / jobname / (jobname + '_######')))(__import__('pathlib').Path, __import__('os').path.abspath, __import__('os').path, settings, (job.name if 'job' in dir() and job and job.name else __import__('os').path.splitext(__import__('os').path.basename(bpy.data.filepath))[0])))",
description: 'Final file path of where render output will be saved',
},
@@ -311,8 +311,8 @@ function authorCreateVideoTask(settings, renderDir) {
return;
}
const stem = path.stem(settings.blendfile).replace('.flamenco', '');
const outfile = path.join(renderDir, `${stem}-${settings.frames}.mp4`);
const jobname = path.basename(renderDir);
const outfile = path.join(renderDir, `${jobname}-${settings.frames}.mp4`);
const outfileExt = needsPreviews ? '.jpg' : settings.image_file_extension;
const task = author.Task('preview-video', 'ffmpeg');
@@ -378,11 +378,11 @@ function computeAutoRenderOutputPath(job) {
} else {
renderRoot = path.join(path.dirname(settings.blendfile), 'Renders');
}
const blendname = path.stem(settings.blendfile).replace('.flamenco', '');
const jobname = (job.name || path.stem(settings.blendfile).replace('.flamenco', '')).trim();
const parts = [renderRoot];
if (submodule) parts.push(submodule);
parts.push(blendname, `${blendname}_######`);
parts.push(jobname, `${jobname}_######`);
return path.join.apply(path, parts);
}