-
Notifications
You must be signed in to change notification settings - Fork 608
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OpenColorIO improvements, especially for 2.2 (#3707)
* OpenColorIO improvements, especially for 2.2 * When OIIO builds against OCIO >= 2.2, in the event that there is no config supplied (e.g., specified by env `$OCIO`), use he new build-in "cg" config to supply a basic set of color spaces and transformations. Yay for OCIO 2.2 and its built-in configs! * New OIIO-understood aliases (regardless of whether they were in the config or not): "scene_linear", "srgb", "lin_srgb", and "ACEScg". It will do its best to know which, if any, supported color spaces are equivalent to these, even if arbitrarily named. For OCIO >= 2.2, some trickery is employed to use the new features that can convert to built-in config color spaces, transforming several colors in this manner and seeing if it gets what would be expected for various canonical color spaces. * `oiiotool --help` now a much abbreviated set of color information (just the OCIO version, and the config, and a hint about how to get more info). * A new command `oiiotool --colorconfiginfo` prints the FULL inventory of color management information, which now has been expanded to reveal the aliases of each color space, print the roles, and generally spruce up the output to be much more readable (though longer) for large configs. * New methods for our ColorConfig class: - `resolve(name)` turns the name, which could be a color space, an alias, a role, or an OIIO-understood universal name (like "sRGB") into a canonical color space name. - `equivalent(name1,name2)` returns whether or not the two names refer, ultimately, to equivalent color spaces (to the best of its ability to figure out). * Some minor changes (including additional `const` qualifiers) on the ColorConfig class. * Make testsuite tests use the built-in OCIO config if OCIO 2.2+ is found. * Build sonar against ocio2.2 so we are primarily testing the new code paths. * For OCIO >= 2.2, because we can count on the built-in configs, conditionally compile a bunch of hard-coded color transforms. These will eventually disappear completely, someday, when OCIO 2.2 is the minimum supported version. I think the behavior should all be largely unchanged when running OIIO in a facility that has a proper OCIO config pointed to by the `$OCIO` env variable and using color space names contained therein. So studio users will (I hope) see no changes. For users that have no OCIO config, or that are writing software that they want to work reasonably well for common cases no matter what config they encounter at runtime, this should give more helpful and consistent behavior when OCIO 2.2+ is used (which I now strongly recommend for anybody not constrained to 2.1 for compatibility reasons. But because of the risk and the possible behavioral changes, this is all currently envisioned as OIIO 2.5 features, and I am not planning to backport it to the 2.4 release branch. Additionally, a lot has changed and I expect some additional tweaking and identification of edge cases I may have missed. * docs, etc
- Loading branch information
Showing
41 changed files
with
916 additions
and
271 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.