86962eb4bd
Deploy / deploy (push) Successful in 10m37s
Previews used to ship the full padded (handle-included) render to clients, with an artist manually pulling picture lock and hand-trimming the comp to match. The automated preview stage now trims the client comp to the picture-lock edit itself (a fixed handle count off each end, per the studio's existing convention) and separately builds an ungraded, full-duration picture-lock reference MP4 as a diagnostic sidecar to check back against. A new "No Picture Lock" panel checkbox is the single override for shots where picture lock is missing or wrong, falling back to today's untrimmed behavior. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
52 lines
1.9 KiB
TypeScript
52 lines
1.9 KiB
TypeScript
import { NextRequest, NextResponse } from "next/server";
|
|
import { isExtAuthorized } from "@/lib/render-pipeline/ext-auth";
|
|
import { toErrorResponse } from "@/lib/render-pipeline/errors";
|
|
import { createExport } from "@/lib/render-pipeline/exports";
|
|
|
|
// ── POST /api/ext/exports (E1 — Queue Export) ────────────────────────────────
|
|
//
|
|
// Body: { manifest: RenderManifest, submittedByEmail?, priority?, force?, skipPreview?, noPictureLock? }
|
|
// The server decides the new version number, updates Shot.shotVersion/exrOutput,
|
|
// supersedes older non-terminal exports, and creates Export(QUEUED) + RenderJob.
|
|
|
|
export async function POST(req: NextRequest) {
|
|
if (!isExtAuthorized(req)) {
|
|
return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
|
|
}
|
|
let body: {
|
|
manifest?: unknown;
|
|
submittedByEmail?: string;
|
|
priority?: number;
|
|
force?: boolean;
|
|
vfxScope?: string | null;
|
|
submissionNote?: string | null;
|
|
skipPreview?: boolean;
|
|
noPictureLock?: boolean;
|
|
};
|
|
try {
|
|
body = await req.json();
|
|
} catch {
|
|
return NextResponse.json({ error: "Invalid JSON" }, { status: 400 });
|
|
}
|
|
if (!body.manifest) {
|
|
return NextResponse.json({ error: "manifest is required" }, { status: 400 });
|
|
}
|
|
try {
|
|
const result = await createExport({
|
|
manifest: body.manifest,
|
|
submittedByEmail: body.submittedByEmail ?? null,
|
|
priority: typeof body.priority === "number" ? body.priority : undefined,
|
|
force: body.force === true,
|
|
// undefined inherits the shot's previous export values
|
|
vfxScope: body.vfxScope,
|
|
submissionNote: body.submissionNote,
|
|
skipPreview: body.skipPreview === true,
|
|
noPictureLock: body.noPictureLock === true,
|
|
});
|
|
return NextResponse.json(result, { status: 201 });
|
|
} catch (err) {
|
|
const { body: errBody, status } = toErrorResponse(err);
|
|
return NextResponse.json(errBody, { status });
|
|
}
|
|
}
|