feat(render-pipeline): regenerate previews without re-rendering EXRs
Deploy / deploy (push) Successful in 5m58s
Deploy / deploy (push) Successful in 5m58s
A slate or burn-in mistake is usually caught after a preview has already
succeeded, and there was no way back: retryPreview required PREVIEW_FAILED, and
READY_FOR_QC only led on to QC_FAILED/READY_FOR_DELIVERY/SUPERSEDED. The only
recourse was a whole new export, re-rendering every EXR and burning a version
number to fix a typo.
- transitions: READY_FOR_QC and QC_FAILED can now go back to GENERATING_PREVIEW.
- regeneratePreview() rebuilds the manifest from scratch rather than patching
anything, so shot code, episode/scene, frame count, slate date and burn-ins
are all re-derived exactly as on a first-time preview. Validated EXRs are
reused and the version number is untouched -- this re-delivers the same
version, it does not make a new one.
- vfxScope and submissionNote are frozen onto the Export at submission time, so
regenerating refreshes that snapshot from the shot's slate fields (explicit
override wins, same precedence as createExport). Slate text edited on the web
app's Slate tab is therefore picked up.
- finalizePreview replaces the media on the export's existing Version instead of
stacking a second row, so the version number stays put and reviewer notes and
annotations survive the reslate. First-time previews are unaffected.
- POST /api/ext/exports/{id}/regenerate-preview exposes it to the panel.
- Panel: Regenerate Previews button, gated on the same statuses as the server,
with a confirm covering what is and is not reused.
Also fixes the slate description source: the Slate tab authors
shot.slateDescription (falling back to shot.description) but the preview
manifest only ever read shot.description, so edits made there never reached the
rendered slate.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -2527,6 +2527,13 @@ var SETTINGS_KEY = "cfg";
|
||||
status === "VALIDATING" || status === "GENERATING_PREVIEW";
|
||||
}
|
||||
|
||||
// Mirrors REGENERATABLE_STATUSES on the server: every state where the EXRs
|
||||
// are known good, so only the preview needs rebuilding.
|
||||
function isRegeneratableExportStatus(status) {
|
||||
return status === "READY_FOR_QC" || status === "QC_FAILED" ||
|
||||
status === "PREVIEW_FAILED";
|
||||
}
|
||||
|
||||
function formatEtaShort(seconds) {
|
||||
var mins;
|
||||
var secs;
|
||||
@@ -2858,6 +2865,57 @@ var SETTINGS_KEY = "cfg";
|
||||
}
|
||||
}
|
||||
|
||||
// Rebuild the delivered MOV/MP4 after a slate/burn-in mistake: same version,
|
||||
// same EXRs, freshly built slate. Slate text (description, scope, note)
|
||||
// comes from the shot record, so it is fixed on the web app first — except
|
||||
// the panel's Sub. Note field, which still wins as a per-export override.
|
||||
function regenerateLatestPreview() {
|
||||
var shotCode = getStatusShotCode();
|
||||
var data;
|
||||
var exportInfo;
|
||||
var body = {};
|
||||
var note;
|
||||
var response;
|
||||
|
||||
if (!shotCode) {
|
||||
setPipelineStatus("Select a comp or shot first");
|
||||
return;
|
||||
}
|
||||
data = getLatestExportData(shotCode);
|
||||
exportInfo = data ? data.export : null;
|
||||
if (!exportInfo) {
|
||||
setPipelineStatus(shotCode + " — no export to regenerate");
|
||||
return;
|
||||
}
|
||||
if (!isRegeneratableExportStatus(String(exportInfo.status))) {
|
||||
setPipelineStatus(formatExportStatus(shotCode, exportInfo) +
|
||||
" — preview can only be regenerated once the render is done");
|
||||
return;
|
||||
}
|
||||
if (!confirm("Rebuild the preview for " + shotCode + " " + exportInfo.versionString + "?\n\n" +
|
||||
"The rendered EXRs are reused and the version number stays the same.\n" +
|
||||
"The existing review version's media is replaced.")) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (uiState.submissionNoteField) {
|
||||
note = trimText(uiState.submissionNoteField.text);
|
||||
if (note) {
|
||||
body.submissionNote = note;
|
||||
}
|
||||
}
|
||||
|
||||
setPipelineStatus(shotCode + " " + exportInfo.versionString + " — regenerating preview...");
|
||||
response = postJSON(CONFIG.baseUrl + "/api/ext/exports/" + exportInfo.id + "/regenerate-preview", body);
|
||||
if (response.status === 200) {
|
||||
setPipelineStatus(shotCode + " " + exportInfo.versionString + " — preview queued");
|
||||
startExportPolling(shotCode);
|
||||
} else {
|
||||
setPipelineStatus("Regenerate failed: " +
|
||||
((response.data && response.data.error) ? response.data.error : "HTTP " + response.status));
|
||||
}
|
||||
}
|
||||
|
||||
function buildUI(thisObjRef) {
|
||||
var win = (thisObjRef instanceof Panel) ? thisObjRef : new Window("palette", "VFXReview Connector", undefined, { resizeable: true });
|
||||
var bannerFile;
|
||||
@@ -2869,9 +2927,11 @@ var SETTINGS_KEY = "cfg";
|
||||
var pipelinePanel;
|
||||
var pipelineRow1;
|
||||
var pipelineRow2;
|
||||
var pipelineRow3;
|
||||
var queueExportButton;
|
||||
var refreshExportButton;
|
||||
var retryExportButton;
|
||||
var regeneratePreviewButton;
|
||||
var buttonsPanel;
|
||||
var btnRow1;
|
||||
var btnRow2;
|
||||
@@ -3006,6 +3066,16 @@ var SETTINGS_KEY = "cfg";
|
||||
refreshExportButton = pipelineRow2.add("button", undefined, "Refresh Status");
|
||||
retryExportButton = pipelineRow2.add("button", undefined, "Retry Export");
|
||||
|
||||
pipelineRow3 = pipelinePanel.add("group");
|
||||
pipelineRow3.orientation = "row";
|
||||
pipelineRow3.alignChildren = ["fill", "center"];
|
||||
pipelineRow3.spacing = 6;
|
||||
regeneratePreviewButton = pipelineRow3.add("button", undefined, "Regenerate Previews");
|
||||
regeneratePreviewButton.helpTip =
|
||||
"Rebuild the MOV/MP4 slate and burn-ins for the delivered version.\n" +
|
||||
"Reuses the rendered EXRs and keeps the version number. Slate text is\n" +
|
||||
"re-read from the shot, so fix it on the web app's Slate tab first.";
|
||||
|
||||
buttonsPanel = scrollContent.add("panel", undefined, "Actions");
|
||||
buttonsPanel.orientation = "column";
|
||||
buttonsPanel.alignChildren = ["fill", "top"];
|
||||
@@ -3122,6 +3192,7 @@ var SETTINGS_KEY = "cfg";
|
||||
queueExportButton.onClick = queueExport;
|
||||
refreshExportButton.onClick = refreshExportStatus;
|
||||
retryExportButton.onClick = retryLatestExport;
|
||||
regeneratePreviewButton.onClick = regenerateLatestPreview;
|
||||
refreshButton.onClick = refreshSelection;
|
||||
fixNamesButton.onClick = fixCompNames;
|
||||
overlayButton.onClick = addOverlay;
|
||||
|
||||
Reference in New Issue
Block a user