HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OCIO_NAMESPACE::DynamicProperty Class Referenceabstract

#include <OpenColorTransforms.h>

Public Member Functions

virtual DynamicPropertyType getType () const noexcept=0
 
DynamicPropertyoperator= (const DynamicProperty &)=delete
 
 DynamicProperty (const DynamicProperty &)=delete
 
virtual ~DynamicProperty ()=default
 Do not use (needed only for pybind11). More...
 

Protected Member Functions

 DynamicProperty ()=default
 

Detailed Description

Allows transform parameter values to be set on-the-fly (after finalization). For example, to modify the exposure in a viewport. Dynamic properties can be accessed from the CPUProcessor or GpuShaderCreator to change values between processing.

OCIO::ConstProcessorRcPtr processor = config->getProcessor(colorSpace1, colorSpace2);
OCIO::ConstCPUProcessorRcPtr cpuProcessor = processor->getDefaultCPUProcessor();
if (cpuProcessor->hasDynamicProperty(OCIO::DYNAMIC_PROPERTY_EXPOSURE))
{
// Get the in-memory implementation of the dynamic property.
cpuProcessor->getDynamicProperty(OCIO::DYNAMIC_PROPERTY_EXPOSURE);
// Get the interface used to change the double value.
// Update of the dynamic property instance with the new value.
exposure->setValue(1.1f);
}
if (cpuProcessor->hasDynamicProperty(OCIO::DYNAMIC_PROPERTY_GRADING_PRIMARY))
{
cpuProcessor->getDynamicProperty(OCIO::DYNAMIC_PROPERTY_GRADING_PRIMARY);
OCIO::GradingPrimary primary = primaryProp->getValue();
primary.m_saturation += 0.1f;
rgbCurveProp->setValue(primary);
}
if (cpuProcessor->hasDynamicProperty(OCIO::DYNAMIC_PROPERTY_GRADING_RGBCURVE))
{
cpuProcessor->getDynamicProperty(OCIO::DYNAMIC_PROPERTY_GRADING_RGBCURVE);
OCIO::ConstGradingRGBCurveRcPtr rgbCurve = rgbCurveProp->getValue()->createEditableCopy();
OCIO::GradingBSplineCurveRcPtr rCurve = rgbCurve->getCurve(OCIO::RGB_RED);
rCurve->getControlPoint(1).m_y += 0.1f;
rgbCurveProp->setValue(rgbCurve);
}

Definition at line 696 of file OpenColorTransforms.h.

Constructor & Destructor Documentation

OCIO_NAMESPACE::DynamicProperty::DynamicProperty ( const DynamicProperty )
delete
virtual OCIO_NAMESPACE::DynamicProperty::~DynamicProperty ( )
virtualdefault

Do not use (needed only for pybind11).

OCIO_NAMESPACE::DynamicProperty::DynamicProperty ( )
protecteddefault

Member Function Documentation

virtual DynamicPropertyType OCIO_NAMESPACE::DynamicProperty::getType ( ) const
pure virtualnoexcept
DynamicProperty& OCIO_NAMESPACE::DynamicProperty::operator= ( const DynamicProperty )
delete

The documentation for this class was generated from the following file: