Fix project length/FPS not updating inheriting timeline clips.

Respect frames_mode/fps_mode in effective duration, propagate frame clears for image-source scenes, and include project timing in ViewBus fingerprints so the timeline rebuilds when project settings change.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
digital-garbage
2026-06-12 17:41:49 +03:00
co-authored by Cursor
parent f9e882d0ce
commit 086e260b33
2 changed files with 7 additions and 2 deletions
+4 -2
View File
@@ -795,13 +795,13 @@
const touches = ["num_frames_per_scene", "frame_rate", "width", "height"].some((k) => k in patch);
if (!touches) return;
for (const sc of p.scenes || []) {
if (_sceneHasManualSource(sc)) continue;
if (patch.num_frames_per_scene != null && (sc.frames_mode || "project") === "project") {
if (patch.num_frames_per_scene != null && (sc.frames_mode || "project") === "project" && !isVideoClip(sc)) {
sc.frames = null;
}
if (patch.frame_rate != null && (sc.fps_mode || "project") === "project") {
sc.fps = null;
}
if (_sceneHasManualSource(sc)) continue;
if (patch.width != null && (sc.width == null || sc.width === before.width)) sc.width = null;
if (patch.height != null && (sc.height == null || sc.height === before.height)) sc.height = null;
}
@@ -1423,12 +1423,14 @@
function sceneEffFrames(sc, project) {
const p = project || state.project;
if (!sc || !p) return p?.num_frames_per_scene || 97;
if ((sc.frames_mode || "project") === "project") return p.num_frames_per_scene || 97;
return sc.frames != null ? sc.frames : p.num_frames_per_scene;
}
function sceneEffFps(sc, project) {
const p = project || state.project;
if (!sc || !p) return p?.frame_rate || 25;
if ((sc.fps_mode || "project") === "project") return p.frame_rate || 25;
return sc.fps != null ? sc.fps : p.frame_rate;
}
+3
View File
@@ -9,6 +9,7 @@
const p = st.project;
return hash({
pid: p.id,
timing: [p.num_frames_per_scene, p.frame_rate, p.width, p.height],
scenes: (p.scenes || []).map((s) => [
s.id, s.text, s.excluded, s.frames, s.fps, s.frames_mode, s.fps_mode,
s.video_transition, s.transition_frames, s.transition_to_next, s.effects,
@@ -47,6 +48,7 @@
overlay: st.selectedOverlayId,
overlays: p.overlay_tracks,
ovLanes: p.overlay_lanes,
timing: [p.num_frames_per_scene, p.frame_rate, p.width, p.height],
scene: sc,
proj: sc ? null : {
name: p.name, anchor: p.anchor, global_prompt: p.global_prompt,
@@ -84,6 +86,7 @@
}
return hash({
pid: p.id,
timing: [p.num_frames_per_scene, p.frame_rate],
scenes: (p.scenes || []).map((s) => [
s.id, s.excluded, s.frames, s.fps, s.frames_mode, s.fps_mode,
s.audio_volume, s.audio_separated, s.source_in, s.source_dur, s.effects,