Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/opencolorio/ocio_impl.cc')
-rw-r--r--intern/opencolorio/ocio_impl.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/intern/opencolorio/ocio_impl.cc b/intern/opencolorio/ocio_impl.cc
index ca1b7cc42e1..8d9c5dd2d49 100644
--- a/intern/opencolorio/ocio_impl.cc
+++ b/intern/opencolorio/ocio_impl.cc
@@ -254,7 +254,12 @@ const char *OCIOImpl::configGetDisplayColorSpaceName(OCIO_ConstConfigRcPtr *conf
const char *view)
{
try {
- return (*(ConstConfigRcPtr *)config)->getDisplayViewColorSpaceName(display, view);
+ const char *name = (*(ConstConfigRcPtr *)config)->getDisplayViewColorSpaceName(display, view);
+ /* OpenColorIO does not resolve this token for us, so do it ourselves. */
+ if (strcasecmp(name, "<USE_DISPLAY_NAME>") == 0) {
+ return display;
+ }
+ return name;
}
catch (Exception &exception) {
OCIO_reportException(exception);
@@ -655,7 +660,8 @@ OCIO_ConstProcessorRcPtr *OCIOImpl::createDisplayProcessor(OCIO_ConstConfigRcPtr
const char *display,
const char *look,
const float scale,
- const float exponent)
+ const float exponent,
+ const bool inverse)
{
ConstConfigRcPtr config = *(ConstConfigRcPtr *)config_;
@@ -718,6 +724,10 @@ OCIO_ConstProcessorRcPtr *OCIOImpl::createDisplayProcessor(OCIO_ConstConfigRcPtr
group->appendTransform(et);
}
+ if (inverse) {
+ group->setDirection(TRANSFORM_DIR_INVERSE);
+ }
+
/* Create processor from transform. This is the moment were OCIO validates
* the entire transform, no need to check for the validity of inputs above. */
ConstProcessorRcPtr *p = MEM_new<ConstProcessorRcPtr>(__func__);