X-Git-Url: http://users.mur.at/ms/git/gitweb/?p=OpenColorIO-Configs.git;a=blobdiff_plain;f=aces_1.0.0%2Fpython%2Faces_ocio%2Futil.py;h=84b43e9d9cc1f5671a997beadf8d658f0fabb8be;hp=fde3ef62655dccb59d2a9645d5224552a702b81f;hb=8a160c48f21fd063b5a59e702a9d5ffdaaefe3b3;hpb=4522d8db6373342fe8eddc5eb97e13322a9e80a3 diff --git a/aces_1.0.0/python/aces_ocio/util.py b/aces_1.0.0/python/aces_ocio/util.py index fde3ef6..84b43e9 100644 --- a/aces_1.0.0/python/aces_ocio/util.py +++ b/aces_1.0.0/python/aces_ocio/util.py @@ -10,37 +10,43 @@ import PyOpenColorIO as OCIO # Utility classes and functions # class ColorSpace: - "A container for data needed to define an OCIO 'Color Space' " + """ + A container for data needed to define an OCIO 'Color Space' + """ def __init__(self, - name, - description=None, - bitDepth=OCIO.Constants.BIT_DEPTH_F32, - equalityGroup=None, - family=None, - isData=False, - toReferenceTransforms=[], - fromReferenceTransforms=[], - allocationType=OCIO.Constants.ALLOCATION_UNIFORM, - allocationVars=[0.0, 1.0]): - "Initialize the standard class variables" + name, + description=None, + bitDepth=OCIO.Constants.BIT_DEPTH_F32, + equalityGroup=None, + family=None, + isData=False, + toReferenceTransforms=[], + fromReferenceTransforms=[], + allocationType=OCIO.Constants.ALLOCATION_UNIFORM, + allocationVars=[0.0, 1.0]): + """ + Initialize the standard class variables + """ self.name = name - self.bitDepth=bitDepth + self.bitDepth = bitDepth self.description = description - self.equalityGroup=equalityGroup - self.family=family - self.isData=isData - self.toReferenceTransforms=toReferenceTransforms - self.fromReferenceTransforms=fromReferenceTransforms - self.allocationType=allocationType - self.allocationVars=allocationVars + self.equalityGroup = equalityGroup + self.family = family + self.isData = isData + self.toReferenceTransforms = toReferenceTransforms + self.fromReferenceTransforms = fromReferenceTransforms + self.allocationType = allocationType + self.allocationVars = allocationVars + # Create a 4x4 matrix (list) based on a 3x3 matrix (list) input def mat44FromMat33(mat33): return [mat33[0], mat33[1], mat33[2], 0.0, mat33[3], mat33[4], mat33[5], 0.0, mat33[6], mat33[7], mat33[8], 0.0, - 0,0,0,1.0] + 0, 0, 0, 1.0] + # TODO: Worth moving to *util.py*. def filter_words(words, filters_in=None, filters_out=None, flags=0):