X-Git-Url: http://users.mur.at/ms/git/gitweb/?a=blobdiff_plain;f=aces_1.0.0%2Fpython%2Faces_ocio%2Futil.py;h=c1ca5d3f3f081b6c8beec92ab517389124065057;hb=75d8749d3630921f8ced18c026cd3cf0d9af14b6;hp=f525d11cab6f788d2c425d7d6b15c07f52fc8d01;hpb=81ebbcda56c215801a15a690b6f9949f25b04caf;p=OpenColorIO-Configs.git diff --git a/aces_1.0.0/python/aces_ocio/util.py b/aces_1.0.0/python/aces_ocio/util.py index f525d11..c1ca5d3 100644 --- a/aces_1.0.0/python/aces_ocio/util.py +++ b/aces_1.0.0/python/aces_ocio/util.py @@ -1,43 +1,65 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + import os import re import PyOpenColorIO as OCIO +__author__ = 'ACES Developers' +__copyright__ = 'Copyright (C) 2014 - 2015 - ACES Developers' +__license__ = '' +__maintainer__ = 'ACES Developers' +__email__ = 'aces@oscars.org' +__status__ = 'Production' + +__all__ = ['ColorSpace', + 'mat44FromMat33', + 'filter_words', + 'files_walker'] + # # 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):