diff --git a/internal/manager/job_compilers/scripts-for-unittest/simple_blender_render.js b/internal/manager/job_compilers/scripts-for-unittest/simple_blender_render.js index 8db37ce7..cbe73256 100644 --- a/internal/manager/job_compilers/scripts-for-unittest/simple_blender_render.js +++ b/internal/manager/job_compilers/scripts-for-unittest/simple_blender_render.js @@ -148,8 +148,17 @@ function authorCreateVideoTask(settings, renderDir) { return; } + var frames = `${settings.frames}`; + if (frames.search(',') != -1) { + // Get the first and last frame from the list + const chunks = frameChunker(settings.frames, 1); + const firstFrame = chunks[0]; + const lastFrame = chunks.slice(-1)[0]; + frames = `${firstFrame}-${lastFrame}`; + } + const stem = path.stem(settings.blendfile).replace('.flamenco', ''); - const outfile = path.join(renderDir, `${stem}-${settings.frames}.mp4`); + const outfile = path.join(renderDir, `${stem}-${frames}.mp4`); const outfileExt = guessOutputFileExtension(settings); const task = author.Task('preview-video', 'ffmpeg'); diff --git a/internal/manager/job_compilers/scripts/simple_blender_render.js b/internal/manager/job_compilers/scripts/simple_blender_render.js index d69d4c9d..d4a18672 100644 --- a/internal/manager/job_compilers/scripts/simple_blender_render.js +++ b/internal/manager/job_compilers/scripts/simple_blender_render.js @@ -129,8 +129,17 @@ function authorCreateVideoTask(settings, renderDir) { return; } + var frames = `${settings.frames}`; + if (frames.search(',') != -1) { + // Get the first and last frame from the list + const chunks = frameChunker(settings.frames, 1); + const firstFrame = chunks[0]; + const lastFrame = chunks.slice(-1)[0]; + frames = `${firstFrame}-${lastFrame}`; + } + const stem = path.stem(settings.blendfile).replace('.flamenco', ''); - const outfile = path.join(renderDir, `${stem}-${settings.frames}.mp4`); + const outfile = path.join(renderDir, `${stem}-${frames}.mp4`); const outfileExt = needsPreviews ? ".jpg" : settings.image_file_extension; const task = author.Task('preview-video', 'ffmpeg');