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 - Allow read and write of file rules without color space validation #1976

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

doug-walker
Copy link
Collaborator

It is generally possible to read and write configs that are syntactically valid but which are incomplete and hence would not pass validation. (For example, it is currently possible to serialize or load a config without any displays and views and would hence fail validation.) This is useful in scenarios where one wants to serialize configs that are only partially complete.

Currently, OCIOYaml.cpp is doing some inappropriate validation during config serialization and parsing regarding the default role and the FileRules Default rule. This PR removes those checks from OCIOYaml.cpp but adds unit tests to confirm that config->validate would still catch these problems.

This gives the calling program the flexibility to serialize a partial config, for example that has a role that refers to a color space that may not have been added yet. Of course, before any config is used the caller should call validate, which is normally where problems of this type are supposed to be surfaced.

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

1 participant