Python Transforms

Transform

AllocationTransform

import PyOpenColorIO as OCIO
transform = OCIO.AllocationTransform()
transform.setAllocation(OCIO.Constants.ALLOCATION_LG2)

CDLTransform

import PyOpenColorIO as OCIO

cdl = OCIO.CDLTransform()
# Set the slope, offset, power, and saturation for each channel.
cdl.setSOP([, , , , , , , , ])
cdl.setSat([, , ])
cdl.getSatLumaCoefs()

ColorSpaceTransform

This class is meant so that ColorSpace conversions can be reused, referencing ColorSpaces that already exist.

Note

Careless use of this may create infinite loops, so avoid referencing the colorspace you’re in.

import PyOpenColorIO as OCIO
transform = OCIO.ColorSpaceTransform()

DisplayTransform

import PyOpenColorIO as OCIO
transform = OCIO.DisplayTransform()

ExponentTransform

import PyOpenColorIO as OCIO
transform = OCIO.ExponentTransform()

FileTransform

GroupTransform

LogTransform

import PyOpenColorIO as OCIO

PyOpenColorIO.LogTransform is used to define a log transform. The direction of the transform and its numerical base can be specified.

LookTransform

MatrixTransform