Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adsk Contrib - Adding support for ocio://cg-config-latest and ocio://studio-config-latest #1773

Conversation

cedrik-fuoco-adsk
Copy link
Contributor

This PR adds two new special names for the built-in configs. The two special names are:
cg-config-latest and studio-config-latest.

They can be used by setting the OCIO environment variables to the following:
ocio://cg-config-latest
ocio://studio-config-latest

A new method called ResolveConfigPath has been added to the public API. It resolves any built-in config's special name into the actual name of the config. For example, at the moment, resolving ocio://default would return ocio://cg-config-v1.0.0_aces-v1.3_ocio-v2.1. The client's application will be able to call that method to save the real built-in config path and be sure that it is going to be forward-compatible.

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
…test

Added unit tests that covers the new names.
CreateFromBuiltinConfig now supports the URI interface directly as well. Previously, it was supporting only the built-in config name (not a URI). The config name was parsed out of the URI before passing it to CreateFromBuiltConfig by CreateFromFile.

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Tweaking unit tests
Other minor changes

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Adding missing type in PyTypes.cpp
Change name of constexpr to follow the others in OCIO (all in capital)
Moved them to the cpp file since they can be useful in tests
Comments

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
…' that was brought up with Clang under Linux and macos.

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
… release.

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
cedrik-fuoco-adsk and others added 2 commits May 17, 2023 09:56
Signed-off-by: Cédrik Fuoco <105517825+cedrik-fuoco-adsk@users.noreply.github.com>
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
@doug-walker doug-walker merged commit 9221ffa into AcademySoftwareFoundation:main Aug 25, 2023
22 checks passed
@doug-walker doug-walker deleted the adsk_contrib/add-resolve-config-path-feature branch August 25, 2023 19:42
brkglvn01 pushed a commit to brkglvn01/OpenColorIO that referenced this pull request Oct 23, 2023
…studio-config-latest (AcademySoftwareFoundation#1773)

* Added ResolveConfigPath function

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>

* Added support for ocio://cg-config-latest and ocio://studio-config-latest
Added unit tests that covers the new names.
CreateFromBuiltinConfig now supports the URI interface directly as well. Previously, it was supporting only the built-in config name (not a URI). The config name was parsed out of the URI before passing it to CreateFromBuiltConfig by CreateFromFile.

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>

* Documentations and typos
Tweaking unit tests
Other minor changes

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>

* documentations

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>

* Using OCIO_BUILTIN_URI_PREFIX where we can in the code (not in tests)
Adding missing type in PyTypes.cpp
Change name of constexpr to follow the others in OCIO (all in capital)
Moved them to the cpp file since they can be useful in tests
Comments

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>

* documentation

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>

* Fixing error : ISO C++ forbids converting a string constant to 'char*' that was brought up with Clang under Linux and macos.

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>

* Remove deprecation for getDefaultBuiltinConfigName. Will wait for 2.3 release.

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>

* Fixing issue with the rebase

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>

---------

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Signed-off-by: Cédrik Fuoco <105517825+cedrik-fuoco-adsk@users.noreply.github.com>
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: Brooke <beg9562@rit.edu>
doug-walker added a commit to autodesk-forks/OpenColorIO that referenced this pull request Dec 6, 2023
…studio-config-latest (AcademySoftwareFoundation#1773)

* Added ResolveConfigPath function

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>

* Added support for ocio://cg-config-latest and ocio://studio-config-latest
Added unit tests that covers the new names.
CreateFromBuiltinConfig now supports the URI interface directly as well. Previously, it was supporting only the built-in config name (not a URI). The config name was parsed out of the URI before passing it to CreateFromBuiltConfig by CreateFromFile.

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>

* Documentations and typos
Tweaking unit tests
Other minor changes

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>

* documentations

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>

* Using OCIO_BUILTIN_URI_PREFIX where we can in the code (not in tests)
Adding missing type in PyTypes.cpp
Change name of constexpr to follow the others in OCIO (all in capital)
Moved them to the cpp file since they can be useful in tests
Comments

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>

* documentation

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>

* Fixing error : ISO C++ forbids converting a string constant to 'char*' that was brought up with Clang under Linux and macos.

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>

* Remove deprecation for getDefaultBuiltinConfigName. Will wait for 2.3 release.

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>

* Fixing issue with the rebase

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>

---------

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Signed-off-by: Cédrik Fuoco <105517825+cedrik-fuoco-adsk@users.noreply.github.com>
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: Doug Walker <Doug.Walker@autodesk.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants