pyocioamf: Add AMF v2.0 and OCIO 2.5+ support#2325
Open
giardiello wants to merge 3 commits into
Open
Conversation
This commit enhances pyocioamf with several new features:
- AMF v2.0 support with automatic version detection from namespace URI
or version attribute. Handles both v1.0 element names (SOPNode/SatNode)
and v2.0 names (ASC_SOP/ASC_SAT).
- OCIO 2.5+ config support using the amf_transform_ids interchange
attribute for transform lookup. Falls back to description-based
search for OCIO 2.1-2.4 configs.
- New CLI options:
- --config: Specify a custom OCIO config file
- --no-idt: Exclude input transform from conversion
- --no-lmt: Exclude look transforms from conversion
- --no-odt: Exclude output transform from conversion
- --split-by-working-location: Generate split CTFs based on
workingLocation marker (AMF v2.0 feature)
- Dynamic ACES2065-1 colorspace detection using role lookup,
common name search, and alias matching.
- New example_v2.amf demonstrating AMF v2.0 format.
Signed-off-by: giardiello <giardiello@me.com>
- Remove incorrect AMF version association with CDL element names. SOPNode/SatNode and ASC_SOP/ASC_SAT are both valid ASC CDL naming conventions, not version-specific. - Simplify ACES2065-1 colorspace detection to use the aces_interchange role, which is defined in all standard ACES configs. - Update README to clarify CDL element naming conventions. Signed-off-by: giardiello <giardiello@me.com>
…tions Port refinements from the Netflix amf-nuke-converter vendored copy: - Restore multi-strategy ACES2065-1 colorspace resolution (aces_interchange role, then common names, then alias search) so conversion works across config naming variants. - Always return absolute paths from check_lut_path so OCIO's CTF write() resolves referenced LUTs correctly regardless of current directory. - Add --ignore-applied-tag to process transforms even when applied="true". - Add --output-prefix and --output-dir for collision-free batch output. Signed-off-by: giardiello <giardiello@me.com>
Author
|
@doug-walker Sorry if this was messy, I've updated the script and re-issued a PR. |
a755ecd to
fb1853a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR enhances
pyocioamfwith support for AMF v2.0 and OCIO 2.5+ configurations. It supersedes #2232 (closed to move the branch onto a fresh public fork and add the refinements below).amf_transform_idsinterchange attribute for transform lookupworkingLocationmarkerChanges
AMF Version Support
urn:ampas:aces:amf:v1.0/v2.0) or version attributeSOPNode/SatNode) and v2.0 names (ASC_SOP/ASC_SAT)OCIO Config Compatibility
amf_transform_idsinterchange attributeaces_interchangerole, then common names, then alias matching (works across config naming variants)CLI Enhancements
--config: specify a custom OCIO config file (supports OCIO 2.1+)--no-idt/--no-lmt/--no-odt: exclude input / look / output transforms--split-by-working-location: generate split CTFs at theworkingLocationmarker--ignore-applied-tag: process transforms even whenapplied="true"--output-prefix/--output-dir: collision-free output naming for batch/concurrent useRobustness
check_lut_pathnow always returns an absolute path so OCIO's CTFwrite()resolves referenced LUTs correctly regardless of the current working directoryNew Files
example_v2.amf: AMF v2.0 example withASC_SOP/ASC_SATelementsBackwards Compatibility
All existing functionality is preserved: the script auto-detects the AMF version and OCIO config version, and defaults to prior behavior when no CLI options are given.