Repository navigation
[Editorial P2.3]: Shared sequence path helpers - #69
jakubjezek001 wants to merge 5 commits into
Conversation
|
Cross-review finding 69-1: docstring says the notation closest to the end wins; the code picks by fixed priority, so a folder token hijacks the path
The docstring: "The notation closest to the end of the path wins, so folders with brackets or hashes do not matter." The body only takes the last match inside one notation and then tries printf, bracket, hash, frame in that order. A folder with a higher-priority token beats the file's own notation, and the result is a corrupted path:
Severity: should-fix. |
|
Cross-review finding 69-2: bare
The Resolve copies only look at
Severity: should-fix. |
|
Cross-review finding 69-3:
Severity: should-fix. |
|
Cross-review finding 69-4: Hiero's frame-number delimiters (
Hiero accepts any non-alphanumeric before the digits; the shared module accepts only
Severity: minor. |
|
Cross-review finding 69-5:
The annotation is ayon-core's Severity: minor. |
One parser and normaliser for printf, bracket, hash and concrete-frame notations, replacing the Hiero, Resolve and Flame copies. Host copies are reproduced in the tests; the deliberate differences are tested and noted.
Cross-review findings 69-1 to 69-5: the nearest notation wins as documented, a # inside a name is not a sequence, reformat_path says that first needs padded=False and has a test for the Resolve api/lib call, get_frame reads Hiero's separators and takes a str or any-case extensions.
699572e to
effe2c1
Compare
|
Author answers to 69-1 to 69-5: all fixed in effe2c1, each with tests in
|
|
Cross-review round 2 on 69-2: the new hash rule is stricter than both hosts that read After effe2c1, Traypublisher's CSV ingest treats any
Severity: minor. |
Cross-review round 2 on 69-2: Hiero and the Traypublisher CSV ingest write it; a # followed by a letter, digit or space is still a plain name.
|
Author answer to the round 2 remark on 69-2 ( |
| ("plate.####.exr", "plate.%04d.exr"), | ||
| ("plate_####.exr", "plate_%04d.exr"), | ||
| ("/a/b/####.exr", "/a/b/%04d.exr"), | ||
| ("plate####.exr", "plate%04d.exr"), |
There was a problem hiding this comment.
ideally also include shot0010_v0010.0010.exr or shot0010_v0010_0010.exr into the checked names
There was a problem hiding this comment.
Added in fad81d5. shot0010_v0010.0010.exr and shot0010_v0010_0010.exr are now checked names: the frame reads as 0010 with padding 4, reformat_frame_filename gives shot0010_v0010.%04d.exr and shot0010_v0010_%04d.exr, and reformat_path leaves a concrete frame alone. Their hash forms (shot0010_v0010.####.exr, shot0010_v0010_####.exr) are in the hash test, and shot0010_v0010.exr / .mov are checked to have no frame (the v0010 is a version, not a frame). The code already handled all of them; no behaviour change.
Review comment on PR 69: shot0010_v0010.0010.exr, shot0010_v0010_0010.exr and their hash forms are checked names.
Changelog Description
New shared module
ayon_editorial.otio.paths: one parser and normaliser for image sequence paths in the notations%04d,[0001-1008],####and a concrete frame (plate.1001.exr).Additional info
Replaces the copies in Hiero, Resolve and Flame. A concrete frame number is only read when asked (
allow_frame_numbers=True,reformat_frame_filename), so a movieclip_0010.movis never taken as frame 10.get_frametakes the accepted extensions as an argument instead of importing ayon-core'sIMAGE_EXTENSIONS.Deliberate differences from the host copies (each has a test):
plate.%04d.v02became%02d. The shared code reads it from the token..<digits>.but measures padding on the last; the shared code uses the number before the extension for both.[...]is left alone where Resolve raisedIndexError.Testing notes:
./tools/manage.sh run-tests(tests/test_otio_paths.py)Dependency
Close #15
Checklist
ruff checkandpytestpass (Python 3.9 with OTIO 0.15, 0.16, 0.17 and 0.18)python create_package.py --skip-zipbuildstests/test_dcc_agnostic.py)