Files
Flamenco-Management/.specstory/history/2026-03-06_22-52-53Z-sequence-determination-in-custom-javascripts.md
T
2026-03-26 09:56:42 -06:00

10 KiB

2026-03-06 22:52:53Z

User

For both custom javascripts, it appears we currently use blendname to determine the sequence. Can we use job name instead? That way, different sequences can be created from the same blend just by changing the job name before submission.


Agent (kimi-k2.5)

Thought Process The user wants to modify the custom JavaScript files to use job name instead of blend name to determine the sequence. Let me first find and read the relevant files to understand the current implementation.

Agent (kimi-k2.5)

Tool use: **glob_file_search** • Searched codebase "" • **2** results in **1** directory

Directory: **** (2 files)

File
scripts/TalkingHeads cycles_optix_gpu.js
scripts/TalkingHeads Custom Render.js

Tool use: **glob_file_search**

Agent (kimi-k2.5)

Thought Process Found both JavaScript files. Let me read them to understand how they currently use blendname to determine the sequence.

Agent (kimi-k2.5)

Tool use: **read_file_v2** • Read file: c:\Users\Nathan\Desktop\flamenco\scripts\TalkingHeads Custom Render.js

Tool use: **read_file_v2**

Agent (kimi-k2.5)

Tool use: **read_file_v2** • Read file: c:\Users\Nathan\Desktop\flamenco\scripts\TalkingHeads cycles_optix_gpu.js

Tool use: **read_file_v2**

Agent (kimi-k2.5)

Thought Process Now I understand the issue. Both scripts use blendname (derived from path.stem(settings.blendfile)) to determine the sequence folder and output file naming. The user wants to use the job name instead so that different sequences can be created from the same blend file just by changing the job name.

Let me identify all the places where blendname is used:

  1. In TalkingHeads Custom Render.js:

    • Line 207: const blendname = path.stem(settings.blendfile).replace('.flamenco', '');
    • Line 217: Used in path construction parts.push(blendname, \${blendname}_######`);`
    • Line 347: const stem = path.stem(settings.blendfile).replace('.flamenco', ''); (for video output)
    • Line 74: The render_output_path eval also uses blend name
  2. In TalkingHeads cycles_optix_gpu.js:

    • Line 381: const blendname = path.stem(settings.blendfile).replace('.flamenco', '');
    • Line 385: Used in path construction parts.push(blendname, \${blendname}_######`);`
    • Line 314: const stem = path.stem(settings.blendfile).replace('.flamenco', ''); (for video output)
    • Line 65: The render_output_path eval also uses blend name

In Flamenco job scripts, the job object should have a name property that contains the job name. Looking at the compileJob function signature, it receives a job object.

I need to:

  1. Add a new setting job_name that gets the job name
  2. Or use job.name directly in the compileJob function

Looking at the Flamenco API, job objects typically have a name property.

I'll modify the scripts to prioritize the job name when creating output paths. By using job.name || blendname, I ensure flexibility in naming while maintaining a fallback to the original blend file name. This approach allows users to customize their sequence output without changing the underlying blend file structure.

The key modifications will involve:

  • Replacing hardcoded blendname references
  • Adding a dynamic naming mechanism
  • Ensuring backward compatibility with existing render workflows

Agent (kimi-k2.5)

I see the issue. Both scripts use blendname (derived from the blendfile filename) to determine the output folder and filename pattern. To use the job name instead, I need to modify the computeAutoRenderOutputPath functions and the video task functions to use job.name instead of blendname.

Let me make those changes.

Agent (kimi-k2.5)

Tool use: **edit_file_v2** • Edit file: c:\Users\Nathan\Desktop\flamenco\scripts\TalkingHeads Custom Render.js

Tool use: **edit_file_v2**

Agent (kimi-k2.5)

Tool use: **edit_file_v2** • Edit file: c:\Users\Nathan\Desktop\flamenco\scripts\TalkingHeads Custom Render.js

Tool use: **edit_file_v2**

Agent (kimi-k2.5)

Tool use: **edit_file_v2** • Edit file: c:\Users\Nathan\Desktop\flamenco\scripts\TalkingHeads cycles_optix_gpu.js

Tool use: **edit_file_v2**

Agent (kimi-k2.5)

Tool use: **edit_file_v2** • Edit file: c:\Users\Nathan\Desktop\flamenco\scripts\TalkingHeads cycles_optix_gpu.js

Tool use: **edit_file_v2**

Agent (kimi-k2.5)

Thought Process All four edits were successful. Now I should also update the render_output_path eval in both files to use job name instead of blend name. Let me check those lines.

Agent (kimi-k2.5)

Now I need to update the render_output_path eval expressions in both files to use job name instead of blend name.

Agent (kimi-k2.5)

Tool use: **edit_file_v2** • Edit file: c:\Users\Nathan\Desktop\flamenco\scripts\TalkingHeads Custom Render.js

Tool use: **edit_file_v2**

Agent (kimi-k2.5)

Tool use: **edit_file_v2** • Edit file: c:\Users\Nathan\Desktop\flamenco\scripts\TalkingHeads cycles_optix_gpu.js

Tool use: **edit_file_v2**

Agent (kimi-k2.5)

Thought Process All edits are complete. Let me verify the changes by reading the relevant sections of both files to make sure everything looks correct.

Agent (kimi-k2.5)

Done. Both scripts now use the job name instead of the blend name to determine the sequence folder and output file naming.

Summary of changes:

  1. computeAutoRenderOutputPath function (in both files): Now uses job.name as the sequence folder name, with a fallback to the blend filename if no job name is set.

  2. authorCreateVideoTask function (in both files): Now derives the output video filename from the render directory (which is based on the job name), ensuring the video name matches the sequence folder.

  3. render_output_path eval (in both files): Updated the auto-eval expression to use job.name when available, falling back to the blend filename.

This means you can now:

  • Submit the same .blend file multiple times with different job names
  • Each job will render to its own sequence folder based on the job name
  • The output files will be named according to the job name

Example: If you have Shot_010.blend and submit it with job name Shot_010_take1, renders go to .../Renders/Shot_010_take1/Shot_010_take1_######.png. Change the job name to Shot_010_take2 for a different sequence output.


User

summarize this change in 72 characters or less.


Agent (kimi-k2.5)

Thought Process The user wants a summary of the changes I made, limited to 72 characters. Let me think about the key change:

  • Changed from using blend filename to job name for render output paths
  • This allows multiple sequences from same blend file

Key points to capture:

  1. Use job name instead of blend name
  2. For render output path determination

Let me draft some options:

"Use job name instead of blend name for render output paths"

  • That's 52 characters, fits well

"Render outputs now use job name instead of blend filename"

  • 54 characters

"Use job name for render folders; enables multiple sequences per blend"

  • 66 characters

"Job name determines sequence folder; allows variants from same blend"

  • 67 characters

"Use job name for output folders; allows multiple sequences per blend file"

  • 69 characters

"Job name now determines output folder instead of blend filename"

  • 59 characters

All of these are under 72. The clearest one might be: "Use job name instead of blend name for render output paths" (52 chars)

Or more descriptive: "Job name determines render folder; enables multiple sequences per blend" (68 chars)

Let me go with something clear and concise.

Agent (kimi-k2.5)

Use job name instead of blend name for render output paths.