diff --git a/movie_editor/frontend/store.js b/movie_editor/frontend/store.js index cdf28c77..2b578d80 100644 --- a/movie_editor/frontend/store.js +++ b/movie_editor/frontend/store.js @@ -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; } diff --git a/movie_editor/frontend/view_bus.js b/movie_editor/frontend/view_bus.js index fb7f69e3..fa0f57d3 100644 --- a/movie_editor/frontend/view_bus.js +++ b/movie_editor/frontend/view_bus.js @@ -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,