Build Shot only ever worked on UNG. Two assumptions were baked in: that a shot's
plates sit flat in a folder named after the episode, and that a shot code is
three letters followed by three 3-digit tokens. DH2_VFX breaks both -- it groups
a shot's plates under a {shotCode}/ folder, has no episode level, and its showId
contains a digit and an underscore.
- findSequenceFolders prefers {group}/{shotCode}/ and falls back to UNG's flat
{group}/{shotCode}_* scan, so both layouts work with no migration -- moving
delivered footage would break the links in every AE project pointing at it. An
existing-but-empty shot folder returns nothing rather than falling through, so
stray plate folders sitting beside a shot cannot be read as its footage.
Underscore-prefixed folders are never shots or plates.
- getFootageGroupFolder replaces getEpisodeRootFolder: the {showId}_{episode}
folder for episodic shows, the show root otherwise. A scene filters the shot
list, it is not a directory -- which is why Build Shot on DH2 was looking in
V:/_FOOTAGE/DH2/027.
- Shot codes are now parsed by stripping the known showId prefix
({showId}_{episode}_{scene}_{shot} for episodic, {showId}_{scene}_{shot} for
standard) rather than matching /[A-Z]{3}_.../ or counting underscores.
extractShotCode keeps the old pattern as a fallback so a comp from a different
show than the selected one still reads. Same anchoring in deriveEpisodeCode
(no more hardcoded "UNG_"), deriveEpisodeAPIValue, isEpisodeCode and the
getShotExportDir episode fallback.
- Two positional cuts of the same class, found on the way: the DELIVERY path and
Pull Picture Lock's episode-prefix match both used shotCode.substring(0, 7).
Both now go through getEpisodePrefix(). Output is identical for UNG and DH2
(DH2_VFX happens to be 7 characters); the one behaviour change is that
standard shows no longer get a constant group level under DELIVERY/, and DH2
has no delivery history to move.
Verified against the live V:/_FOOTAGE tree by running the real functions under a
Folder stub: UNG_102_019_010 resolves its BG01/FG01 plates via the flat scan, and
DH2_VFX_027_010 and DH2_VFX_066_380 resolve theirs via the grouped layout. Not
yet exercised in After Effects.
Initialise Workspace is untouched and still hardcoded to UNG -- next.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>