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.

…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 <[email protected]>
Tweaking unit tests
Other minor changes

Signed-off-by: Cédrik Fuoco <[email protected]>
Signed-off-by: Cédrik Fuoco <[email protected]>
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 <[email protected]>
Signed-off-by: Cédrik Fuoco <[email protected]>
…' that was brought up with Clang under Linux and macos.

Signed-off-by: Cédrik Fuoco <[email protected]>
@doug-walker doug-walker merged commit 9221ffa into AcademySoftwareFoundation:main Aug 25, 2023
21 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 <[email protected]>

* 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 <[email protected]>

* Documentations and typos
Tweaking unit tests
Other minor changes

Signed-off-by: Cédrik Fuoco <[email protected]>

* documentations

Signed-off-by: Cédrik Fuoco <[email protected]>

* 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 <[email protected]>

* documentation

Signed-off-by: Cédrik Fuoco <[email protected]>

* 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 <[email protected]>

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

Signed-off-by: Cédrik Fuoco <[email protected]>

* Fixing issue with the rebase

Signed-off-by: Cédrik Fuoco <[email protected]>

---------

Signed-off-by: Cédrik Fuoco <[email protected]>
Signed-off-by: Cédrik Fuoco <[email protected]>
Signed-off-by: Doug Walker <[email protected]>
Co-authored-by: Doug Walker <[email protected]>
Signed-off-by: Brooke <[email protected]>
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 <[email protected]>

* 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 <[email protected]>

* Documentations and typos
Tweaking unit tests
Other minor changes

Signed-off-by: Cédrik Fuoco <[email protected]>

* documentations

Signed-off-by: Cédrik Fuoco <[email protected]>

* 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 <[email protected]>

* documentation

Signed-off-by: Cédrik Fuoco <[email protected]>

* 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 <[email protected]>

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

Signed-off-by: Cédrik Fuoco <[email protected]>

* Fixing issue with the rebase

Signed-off-by: Cédrik Fuoco <[email protected]>

---------

Signed-off-by: Cédrik Fuoco <[email protected]>
Signed-off-by: Cédrik Fuoco <[email protected]>
Signed-off-by: Doug Walker <[email protected]>
Co-authored-by: Doug Walker <[email protected]>
Signed-off-by: Doug Walker <[email protected]>
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.

4 participants