'
+ spineHtml() + cutsHtml(meta) + reviewsHtml(meta) + wholeHtml() + castHtml + body;
}
@@ -849,6 +872,103 @@
}).join("");
}
+ // WHAT TO DO NEXT. The steps of making a trailer, in order, with the one
+ // button that matters now. Everything else on the page is still there for
+ // anyone who wants it; nobody has to understand it to get a film made.
+ function guideHtml(meta) {
+ var shots = PKG.shots || [];
+ if (!shots.length || meta.writer !== RUN.lead_writer) return "";
+ var ds = String(meta.draw_state || "");
+ var drawing = ds && !/^(drawn|failed)/.test(ds);
+ var toDraw = Number(PKG.pictures_to_draw || 0);
+ var drawn = shots.filter(function (x) { return x.opening_url; });
+ var unchecked = drawn.filter(function (x) {
+ return !x.clip_url && !((x.frame_check || {}).verdict); }).length;
+ var faulty = drawn.filter(function (x) {
+ return !x.clip_url && (x.frame_check || {}).verdict === "broken"; });
+ var ps = String(PKG.pics_state || "");
+ var checking = ps && ps !== "ready";
+ var reelReady = String(PKG.reel_state || "") === "ready";
+ var unfilmed = shots.filter(function (x) { return !x.clip_url; }).length;
+ var objections = String((DRAFTNOW || {}).problems || "").split("\n").filter(Boolean).length;
+ var price = function (n) { return "$" + n.toFixed(2); };
+
+ var steps = [];
+ steps.push({ t: "Read the script", done: true,
+ d: objections ? "The checker has " + objections + " objection" + (objections === 1 ? "" : "s")
+ + " - they are listed just below." : "" });
+ steps.push({ t: "Tell the writer what to change", done: true, optional: true,
+ d: "Write in the box \u201cYour notes on the script as a whole\u201d, or under any shot, then press "
+ + "\u201cRevise the whole script\u201d. Skip this if you are happy." });
+
+ var s3 = { t: "Draw the pictures", done: toDraw === 0 && drawn.length > 0 };
+ if (drawing) s3.d = "Drawing now\u2026 " + esc(ds) + ". You can leave this page open.";
+ else if (!s3.done) s3.btn = '';
+ steps.push(s3);
+
+ var s4 = { t: "Check the pictures", done: s3.done && !unchecked && !faulty.length };
+ if (checking) s4.d = "Looking at every picture for mistakes\u2026 " + esc(ps);
+ else if (s3.done && unchecked) {
+ s4.d = "A second model looks at every picture for the mistakes these tools make - the wrong time "
+ + "of day, the wrong clothes, extra people, six fingers - and redraws any that are broken.";
+ s4.btn = '';
+ } else if (s3.done && faulty.length)
+ s4.d = faulty.length + " picture" + (faulty.length === 1 ? " still has" : "s still have")
+ + " a problem: shot" + (faulty.length === 1 ? " " : "s ")
+ + faulty.map(function (x) { return x.id; }).join(", ")
+ + ". Scroll to " + (faulty.length === 1 ? "it" : "them") + " and press \u201cFix this\u201d, "
+ + "or carry on if you think the checker is being fussy.";
+ steps.push(s4);
+
+ var s5 = { t: "Listen to the storyboard", done: reelReady };
+ if (s3.done && !reelReady)
+ s5.btn = '';
+ steps.push(s5);
+
+ var s6 = { t: "Film it", done: unfilmed === 0 };
+ if (s3.done && unfilmed)
+ s6.btn = '';
+ steps.push(s6);
+
+ var nowSet = false;
+ return '
'
+ + 'The checker looked at this picture and sees:' + retried
+ + rows.map(function (r, i) {
+ return '' + esc(r.what)
+ + ' ';
+ }).join("")
+ + '
';
+ }
+
// "That is not right" - about the PICTURE, in the author's own words. The
// picture is what the shot is filmed from, so a fault here is inherited by
// the film and cannot be fixed by filming again.
@@ -1037,6 +1157,7 @@
+ (s.day ? ' · ' + esc(s.day) + '' : '')
+ ''
+ media
+ + frameCheckHtml(s)
+ frameFaultHtml(s)
+ whoInHtml(s)
+ '
' + esc(s.action || "") + '
'
@@ -1225,6 +1346,28 @@
z.classList.add("on");
return;
}
+ if ((el = hit("data-chkpics"))) {
+ el.disabled = true; el.textContent = "starting\u2026";
+ r = await act("check_pictures", { draft_id: CUR });
+ if (r) { showMsg("msg", r.shots ? "Checking " + r.shots + " pictures. Broken ones are redrawn "
+ + "automatically. This takes a few minutes." : (r.note || "Already checked."), "ok"); await refresh(); }
+ return;
+ }
+ if ((el = hit("data-fixfault"))) {
+ var ff = el.getAttribute("data-fixfault").split("|");
+ var fs = (PKG.shots || []).filter(function (x) { return String(x.id) === ff[0]; })[0] || {};
+ var fcx = fs.frame_check || {};
+ var all = (fcx.duplicated || []).filter(Boolean).map(function (d) {
+ return "The same person appears twice: " + d + ". Each person appears once only."; })
+ .concat((fcx.faults || []).filter(function (f) { return f && f.what; })
+ .map(function (f) { return f.what; }));
+ var say = all[Number(ff[1])] || "";
+ if (!say) return;
+ el.disabled = true; el.textContent = "working\u2026";
+ r = await act("report_frame_fault", { draft_id: CUR, shot_id: ff[0], note: say });
+ if (r) { showMsg("msg", "Redrawing shot " + ff[0] + " to fix that. About a minute.", "ok"); await refresh(); }
+ return;
+ }
if ((el = hit("data-ffgo"))) {
var fsid = el.getAttribute("data-ffgo");
var fbox = document.getElementById("ff-" + fsid);