fix: video roles skip linked inputs, project.video wins over derived values
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
6591f8c546
commit
4c1fa336a5
+3
-2
@@ -3733,11 +3733,10 @@
|
||||
// wins that race on purpose (see extensive_testing round 1 finding).
|
||||
// The value a `project.video` role asks for. The editor keeps these as flat project fields
|
||||
// (width, height, frames per scene), the pipeline names them per node (width/target_width,
|
||||
// length...); a value stored under the role's own name wins, so a hand-set one is honoured.
|
||||
// length...); a value stored in project.video under the role's own name wins.
|
||||
// `length` is the frames THIS RUN covers: one scene's own, or every scene's for a whole-timeline run.
|
||||
function _videoRoleValue(input, targetSceneIds) {
|
||||
const p = state.project;
|
||||
if (p[input] !== undefined) return p[input];
|
||||
if (p.video && p.video[input] !== undefined) return p.video[input];
|
||||
if (input === "width" || input === "target_width") return p.width;
|
||||
if (input === "height" || input === "target_height") return p.height;
|
||||
@@ -3758,6 +3757,8 @@
|
||||
for (const slot of (window.PipelineState.slots() || [])) {
|
||||
for (const role of (slot.roles || [])) {
|
||||
if (role.at !== "project.video") continue;
|
||||
// An input another node feeds takes its value from that node: sending one too is refused.
|
||||
if (Array.isArray((slot.inputs || {})[role.input])) continue;
|
||||
const v = _videoRoleValue(role.input, targetSceneIds);
|
||||
if (v === undefined) continue;
|
||||
raw[slot.id] = { ...(raw[slot.id] || {}), [role.input]: v };
|
||||
|
||||
Reference in New Issue
Block a user