feat(render-pipeline): sync task title to preview version, fill slate ShotName
finalizePreview now retitles the export's task so its version suffix matches the preview that was just uploaded (UNG_102_019_010_cmp_TT_v004 -> _v005), which is the rename the manual batch upload already does on rename-and-upload. The new nextTaskTitle helper mirrors nextExrOutputBase so the task title, EXR base and preview filename all derive the suffix the same way. It uses the export's versionString rather than versionNumber, since the DB number is bumped to stay monotonic per task while the filename follows the shot's shotVersion. The rename only fires when a Version was actually created, runs in the same transaction, and is recorded in the ExportEvent note; the finalize response now returns the task id, title and whether it changed. Task status is deliberately untouched (pipeline renders must not resurface in the review flow, S10.0). The headless preview build was addressing the slate's identity fields by index only, so ShotName was never filled on the farm. setSlateIdentity writes both the named property and the index -- the name-with-index-fallback pattern the panel already uses for VersionName -- and warns with the template's actual property names when neither resolves, instead of failing silently. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -230,6 +230,26 @@
|
||||
return names;
|
||||
}
|
||||
|
||||
// Slate identity fields (version name, shot name). Current templates expose
|
||||
// these under a stable name, older ones only positionally, and the two do
|
||||
// not always line up — so write both. Setting the same property twice is
|
||||
// harmless; the panel uses the same name-with-index-fallback pattern.
|
||||
function setSlateIdentity(layer, propName, index, value, label) {
|
||||
var byName;
|
||||
var byIndex;
|
||||
|
||||
if (value === null || value === undefined || value === "") {
|
||||
return; // leave the template's own default
|
||||
}
|
||||
byName = setEssentialProperty(layer, propName, value);
|
||||
byIndex = setEssentialPropertyByIndex(layer, index, value);
|
||||
if (!byName && !byIndex) {
|
||||
warn(label + ": neither Essential Property \"" + propName + "\" nor index " +
|
||||
index + " could be set. Available: " +
|
||||
listEssentialPropertyNames(layer).join(", "));
|
||||
}
|
||||
}
|
||||
|
||||
// Per-submission fields (VFX Scope / Submission Note). The property names
|
||||
// come from config; if one does not exist, report the template's actual
|
||||
// property names so it can be corrected without another build.
|
||||
@@ -439,12 +459,15 @@
|
||||
|
||||
var slateLayer = previewComp.layer("NETFLIX_SLATE");
|
||||
if (slateLayer) {
|
||||
// Index-addressed properties match the panel exactly (3 = version
|
||||
// name, 10 = shot code); the rest are addressed by name.
|
||||
setEssentialPropertyByIndex(slateLayer, 3, ctx.slate.versionName);
|
||||
// Identity fields match the panel's indices (3 = version name,
|
||||
// 10 = shot name) and are also written by name; the rest are
|
||||
// addressed by name only.
|
||||
// VersionName carries the full "{shotCode}_cmp_TT_{version}";
|
||||
// ShotName is the bare shot code, with no version suffix.
|
||||
setSlateIdentity(slateLayer, "VersionName", 3, ctx.slate.versionName, "Version Name");
|
||||
setSlateIdentity(slateLayer, "ShotName", 10, ctx.slate.shotCode, "Shot Name");
|
||||
setEssentialProperty(slateLayer, "Date", ctx.slate.date);
|
||||
setEssentialProperty(slateLayer, "Desc", ctx.slate.description);
|
||||
setEssentialPropertyByIndex(slateLayer, 10, ctx.slate.shotCode);
|
||||
setEssentialProperty(slateLayer, "Episode", ctx.slate.episode);
|
||||
setEssentialProperty(slateLayer, "Scene", ctx.slate.scene);
|
||||
setEssentialProperty(slateLayer, "Frames", result.frameCount);
|
||||
|
||||
Reference in New Issue
Block a user