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

Default view transform missing on config copy #1885

Closed
mdecaria opened this issue Oct 12, 2023 · 0 comments · Fixed by #1886
Closed

Default view transform missing on config copy #1885

mdecaria opened this issue Oct 12, 2023 · 0 comments · Fixed by #1886

Comments

@mdecaria
Copy link
Contributor

Default view transform is dropped on config copy using the equal operator.

Python reproduction

import PyOpenColorIO as ocio
config = ocio.Config.CreateFromFile("ocio://default")
config.getDefaultViewTransformName()
'Un-tone-mapped'
ocio.SetCurrentConfig(config)
ocio.GetCurrentConfig().getDefaultViewTransformName()
''

C++ reproduction

OCIO::ConstConfigRcPtr config = OCIO::Config::CreateFromBuiltinConfig("ocio://default");
std::cerr << "config 1 "<< config->getDefaultViewTransformName() << std::endl;
OCIO::ConstConfigRcPtr config2 = config->createEditableCopy();
std::cerr << "config 2 " << config2->getDefaultViewTransformName() << std::endl;

Output:
config 1 Un-tone-mapped
config 2
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 a pull request may close this issue.

1 participant