1 import PyOpenColorIO as OCIO
4 # Utility classes and functions
7 "A container for data needed to define an OCIO 'Color Space' "
12 bitDepth=OCIO.Constants.BIT_DEPTH_F32,
16 toReferenceTransforms=[],
17 fromReferenceTransforms=[],
18 allocationType=OCIO.Constants.ALLOCATION_UNIFORM,
19 allocationVars=[0.0, 1.0]):
20 "Initialize the standard class variables"
22 self.bitDepth=bitDepth
23 self.description = description
24 self.equalityGroup=equalityGroup
27 self.toReferenceTransforms=toReferenceTransforms
28 self.fromReferenceTransforms=fromReferenceTransforms
29 self.allocationType=allocationType
30 self.allocationVars=allocationVars
32 # Create a 4x4 matrix (list) based on a 3x3 matrix (list) input
33 def mat44FromMat33(mat33):
34 return [mat33[0], mat33[1], mat33[2], 0.0,
35 mat33[3], mat33[4], mat33[5], 0.0,
36 mat33[6], mat33[7], mat33[8], 0.0,