imageworks/OpenColorIO — Issue #202: add FileTransform example to ociodisplay
Author: jeremyselan
Created: 2011-12-19 19:46:46+00:00
State: open

Sometimes applications want to provide an alternate to OCIO management, using a raw filetransform. Add example code for this to ociodisplay:

if (fileTransform)
{
OCIO::GroupTransformRcPtr group = OCIO::GroupTransform::Create();
group->push_back(gainTransform);
group->push_back(swizzle);
group->push_back(fileTransform);
group->push_back(expTransform);

processor = config->getProcessor(group);
}
else
{
OCIO::DisplayTransformRcPtr transform = OCIO::DisplayTransform::Create();
transform->setInputColorSpaceName(colorspace);
transform->setDisplay(display);
transform->setView(view);
transform->setLinearCC(gainTransform);
transform->setDisplayCC(expTransform);
processor = config->getProcessor(transform);
}