diff --git a/VFXReviewConnector.jsx b/VFXReviewConnector.jsx index c208c58..1589773 100644 --- a/VFXReviewConnector.jsx +++ b/VFXReviewConnector.jsx @@ -27,7 +27,7 @@ var SETTINGS_KEY = "cfg"; // Bump on every change deployed to a workstation. The panel reports this to // the server on load, so Pipeline → Machines shows which version each machine // is actually running and flags the ones left behind. -var PANEL_VERSION = "2.1.0"; +var PANEL_VERSION = "2.1.1"; (function VFXReviewConnector(thisObj) { var uiState = { @@ -828,17 +828,22 @@ var PANEL_VERSION = "2.1.0"; return mappings; } + // Returns *every* rewrite whose prefix matches, not just the first: a shop + // with more than one on-disk convention (an old export root and a current + // one) can map the same prefix twice, and resolveServerPath picks whichever + // candidate actually exists. function applyPathMappings(path) { var mappings = parsePathMappings(); var normalized = normalizeSlashes(path); + var results = []; var i; for (i = 0; i < mappings.length; i += 1) { if (normalized.toLowerCase().indexOf(mappings[i].from.toLowerCase()) === 0) { - return mappings[i].to + normalized.substring(mappings[i].from.length); + results.push(mappings[i].to + normalized.substring(mappings[i].from.length)); } } - return null; + return results; } // Re-base a server path onto Export Root from the show folder down, which @@ -874,8 +879,8 @@ var PANEL_VERSION = "2.1.0"; var rebased; var i; - if (mapped) { - candidates.push({ path: mapped, how: "path mapping" }); + for (i = 0; i < mapped.length; i += 1) { + candidates.push({ path: mapped[i], how: "path mapping" }); } candidates.push({ path: normalizeSlashes(serverPath), how: "server path" }); diff --git a/VFXReviewConnector.md b/VFXReviewConnector.md index 8e2da80..80d732b 100644 --- a/VFXReviewConnector.md +++ b/VFXReviewConnector.md @@ -36,9 +36,24 @@ It resolves this itself in most cases, trying in order: from the show folder down (`{root}/{showId}/{episode}/{shot}/{version}`), so the tail is simply re-attached to Export Root. -Step 3 is why this usually needs no configuration. Set Path Mappings only when -the two layouts genuinely differ. **Diagnostics** checks this against a real -render folder from the QC queue and names every path it tried when it fails. +Step 3 is why this usually needs no configuration. **Diagnostics** checks the +whole thing against a real render folder from the QC queue and names every path +it tried when it fails. + +### More than one on-disk convention + +Every candidate is tested for existence and the first that resolves wins, so a +studio whose output root changed at some point can map the **same prefix more +than once** and let the panel work out which applies per export: + +``` +//SAN/=V:/_EXPORTS/;//SAN/=V:/_EXPORTS/UNG/ +``` + +Older exports keep whatever path was stored on them when they were queued — +changing `render.outputRoot` on the server only affects new ones — so mixed +conventions in one database are normal and permanent. Add a mapping per +convention rather than trying to make one rewrite cover them all. ---