From 9ddb90033b195f30b79fb09ec43a479aed00f1f2 Mon Sep 17 00:00:00 2001 From: gator Date: Thu, 24 Sep 2026 02:04:41 +0000 Subject: [PATCH] Opening picture: the last frame of an earlier shot in the scene (shot / reverse shot) --- trailer.html | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/trailer.html b/trailer.html index 3922ec4..235c39d 100644 --- a/trailer.html +++ b/trailer.html @@ -1501,6 +1501,20 @@ var i = all.findIndex(function (x) { return x.id === s.id; }); return i > 0 ? all[i - 1] : null; } + // Shot / reverse shot: Em, Dorothy, Em. The shot before faces the other + // way; the frame to open on is the last one of the earlier shot from the + // same angle. Offer every filmed shot earlier in the same scene. + function earlierHtml(s, p) { + var all = (PKG.shots || []).slice().sort(function (a, b) { return String(a.id).localeCompare(String(b.id)); }); + var i = all.findIndex(function (x) { return x.id === s.id; }); + var opts = all.slice(Math.max(0, i - 12), i).filter(function (x) { + return x.id !== p.id && x.clip_url && (x.scene || "") === (s.scene || ""); + }).reverse(); + if (!opts.length) return ""; + return ' or shot '; + } function openingHtml(s) { var p = prevShot(s); if (!p) return ""; @@ -1508,6 +1522,7 @@ return '
Opening picture' + '' + '' + + earlierHtml(s, p) + from + ' Motion ' + (s.motion_from ? 'follows shot ' + esc(s.motion_from.shot) + '\'s clip (direction of travel, camera side, pace) ' @@ -1724,7 +1739,9 @@ if ((el = hit("data-useframe"))) { var uf = el.getAttribute("data-useframe").split("|"); el.disabled = true; - r = await act("use_frame", { draft_id: CUR, shot_id: uf[1], frame: uf[0] }); + var ufreq = { draft_id: CUR, shot_id: uf[1], frame: uf[0] }; + if (uf[0] === "lastof") { var sel = document.getElementById("lastof-" + uf[1]); ufreq.frame = "last"; ufreq.from_shot = sel ? sel.value : ""; } + r = await act("use_frame", ufreq); if (r) { showMsg("msg", r.frame === "motion" ? "Shot " + uf[1] + " will follow the motion of shot " + r.from + "'s clip when it is filmed." : r.frame === "nomotion" ? "Shot " + uf[1] + " no longer follows a clip." : "Shot " + uf[1] + " opens on the " + r.frame + " frame of shot " + r.from + (r.frame === "last" ? " - taking the frame from the clip, a few seconds." : "."), "ok"); await refresh(); } else el.disabled = false; return;