__all__ = ['createLogC',
'createColorSpaces']
-#
-# LogC to ACES
-#
+
def createLogC(gamut,
transferFunction,
exposureIndex,
name,
lutDir,
lutResolution1d):
+ """
+ Object description.
+
+ LogC to ACES.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
name = "%s (EI%s) - %s" % (transferFunction, exposureIndex, gamut)
if transferFunction == "":
name = "Linear - %s" % gamut
def createColorSpaces(lutDir, lutResolution1d):
+ """
+ Generates the colorspace conversions.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
colorspaces = []
transferFunction = "V3 LogC"
__all__ = ['createCanonLog',
'createColorSpaces']
-#
-# Canon-Log to ACES
-#
+
def createCanonLog(gamut, transferFunction, name, lutDir, lutResolution1d):
+ """
+ Object description.
+
+ Canon-Log to ACES.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
name = "%s - %s" % (transferFunction, gamut)
if transferFunction == "":
name = "Linear - %s" % gamut
return cs
-# Generate all color spaces conversion
def createColorSpaces(lutDir, lutResolution1d):
+ """
+ Generates the colorspace conversions.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
colorspaces = []
# Full conversion
__all__ = ['createREDlogFilm',
'createColorSpaces']
-#
-# RED color spaces to ACES
-#
+
def createREDlogFilm(gamut, transferFunction, name, lutDir, lutResolution1d):
+ """
+ Object description.
+
+ RED colorspaces to ACES.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
name = "%s - %s" % (transferFunction, gamut)
if transferFunction == "":
name = "Linear - %s" % gamut
return cs
-# Generate all color spaces conversion
def createColorSpaces(lutDir, lutResolution1d):
+ """
+ Generates the colorspace conversions.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
colorspaces = []
# Full conversion
__all__ = ['createSlog',
'createColorSpaces']
-#
-# SLog to ACES
-#
+
def createSlog(gamut, transferFunction, name, lutDir, lutResolution1d):
+ """
+ Object description.
+
+ SLog to ACES.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
name = "%s - %s" % (transferFunction, gamut)
if transferFunction == "":
name = "Linear - %s" % gamut
def createColorSpaces(lutDir, lutResolution1d):
+ """
+ Generates the colorspace conversions.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
colorspaces = []
# SLog1
# -*- coding: utf-8 -*-
"""
-usage from python
+usage from python:
-import sys
-sys.path.append("/path/to/script")
-import create_aces_config as cac
-acesReleaseCTLDir = "/path/to/github/checkout/releases/v0.7.1/transforms/ctl"
-configDir = "/path/to/config/dir"
-cac.createACESConfig(acesReleaseCTLDir, configDir, 1024, 33, True)
+>>> import sys
+>>> sys.path.append("/path/to/script")
+>>> import create_aces_config as cac
+>>> acesReleaseCTLDir = "/path/to/github/checkout/releases/v0.7.1/transforms/ctl"
+>>> configDir = "/path/to/config/dir"
+>>> cac.createACESConfig(acesReleaseCTLDir, configDir, 1024, 33, True)
-usage from command line, from the directory with 'create_aces_config.py'
-python create_aces_config.py -a "/path/to/github/checkout/releases/v0.7.1/transforms/ctl" -c "/path/to/config/dir" --lutResolution1d 1024 --lutResolution3d 33 --keepTempImages
+usage from command line, from the directory with 'create_aces_config.py':
+$ python create_aces_config.py -a "/path/to/github/checkout/releases/v0.7.1/transforms/ctl" -c "/path/to/config/dir" --lutResolution1d 1024 --lutResolution3d 33 --keepTempImages
build instructions for osx for needed packages.
ACES_OCIO_CTL_DIRECTORY_ENVIRON = 'ACES_OCIO_CTL_DIRECTORY'
ACES_OCIO_CONFIGURATION_DIRECTORY_ENVIRON = 'ACES_OCIO_CONFIGURATION_DIRECTORY'
-#
-# Utility functions
-#
+
def setConfigDefaultRoles(config,
color_picking="",
color_timing="",
reference="",
scene_linear="",
texture_paint=""):
- # Add Roles
+ """
+ Sets given *OCIO* configuration default roles.
+
+ Parameters
+ ----------
+ config : config
+ *OCIO* configuration.
+ color_picking : str or unicode
+ Color picking role title.
+ color_timing : str or unicode
+ Color timing role title.
+ compositing_log : str or unicode
+ Compositing log role title.
+ data : str or unicode
+ Data role title.
+ default : str or unicode
+ Default role title.
+ matte_paint : str or unicode
+ Matte painting role title.
+ reference : str or unicode
+ Reference role title.
+ scene_linear : str or unicode
+ Scene linear role title.
+ texture_paint : str or unicode
+ Texture painting role title.
+
+ Returns
+ -------
+ bool
+ Definition success.
+ """
+
if color_picking:
config.setRole(OCIO.Constants.ROLE_COLOR_PICKING, color_picking)
if color_timing:
if texture_paint:
config.setRole(OCIO.Constants.ROLE_TEXTURE_PAINT, texture_paint)
+ return True
+
-# Write config to disk
def writeConfig(config, configPath, sanityCheck=True):
+ """
+ Writes the configuration to given path.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
if sanityCheck:
try:
config.sanityCheck()
def generateOCIOTransform(transforms):
+ """
+ Object description.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
# print("Generating transforms")
interpolationOptions = {
def createConfig(configData, nuke=False):
+ """
+ Object description.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
# Create the config
config = OCIO.Config()
return config
-#
-# Functions to generate color space definitions and LUTs for transforms for a
-# specific ACES release.
-#
-
-# Output is a list of colorspaces and transforms that convert between those
-# colorspaces and reference color space, ACES
def generateLUTs(odtInfo,
lmtInfo,
shaperName,
lutResolution1d=4096,
lutResolution3d=64,
cleanup=True):
+ """
+ Object description.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ dict
+ Colorspaces and transforms converting between those colorspaces and
+ the reference colorspace, *ACES*.
+ """
+
print("generateLUTs - begin")
configData = {}
lutResolution1d,
lutResolution3d,
lutResolutionShaper=1024):
+ """
+ Object description.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
# Add the legal and full variations into this list
odtInfoC = dict(odtInfo)
for odtCTLName, odtValues in odtInfo.iteritems():
def createConfigDir(configDir, bakeSecondaryLUTs):
+ """
+ Object description.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
dirs = [configDir, "%s/luts" % configDir]
if bakeSecondaryLUTs:
dirs.extend(["%s/baked" % configDir,
def getTransformInfo(ctlTransform):
+ """
+ Object description.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
fp = open(ctlTransform, 'rb')
# Read lines
return transformID, transformUserName, transformUserNamePrefix
-# For versions after WGR9
def getODTInfo(acesCTLReleaseDir):
+ """
+ Object description.
+
+ For versions after WGR9.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
# Credit to Alex Fry for the original approach here
odtDir = os.path.join(acesCTLReleaseDir, "odt")
allodt = []
return odts
-# For versions after WGR9
def getLMTInfo(acesCTLReleaseDir):
+ """
+ Object description.
+
+ For versions after WGR9.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
# Credit to Alex Fry for the original approach here
lmtDir = os.path.join(acesCTLReleaseDir, "lmt")
alllmt = []
return lmts
-#
-# Create the ACES config
-#
def createACESConfig(acesCTLReleaseDir,
configDir,
lutResolution1d=4096,
lutResolution3d=64,
bakeSecondaryLUTs=True,
cleanup=True):
+ """
+ Creates the ACES configuration.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
# Get ODT names and CTL paths
odtInfo = getODTInfo(acesCTLReleaseDir)
return True
-#
-# Main
-#
def main():
+ """
+ Object description.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
import optparse
p = optparse.OptionParser(description='An OCIO config generation script',
#
# Get options
- #
+ #
acesCTLDir = options.acesCTLDir
configDir = options.configDir
lutResolution1d = int(options.lutResolution1d)
bakeSecondaryLUTs,
cleanupTempImages)
-# main
if __name__ == '__main__':
main()
'generate3dLUTFromCTL',
'main']
-#
-# Functions used to generate LUTs using CTL transforms
-#
+
def generate1dLUTImage(ramp1dPath,
resolution=1024,
minValue=0.0,
maxValue=1.0):
+ """
+ Object description.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
# print("Generate 1d LUT image - %s" % ramp1dPath)
# open image
ramp.close()
-# Credit to Alex Fry for the original single channel version of the spi1d
-# writer
def writeSPI1D(filename, fromMin, fromMax, data, entries, channels):
+ """
+ Object description.
+
+ Credit to *Alex Fry* for the original single channel version of the spi1d
+ writer.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
f = file(filename, 'w')
f.write("Version 1\n")
f.write("From %f %f\n" % (fromMin, fromMax))
outputPath=None,
minValue=0.0,
maxValue=1.0):
+ """
+ Object description.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
if outputPath == None:
outputPath = ramp1dPath + ".spi1d"
def generate3dLUTImage(ramp3dPath, resolution=32):
+ """
+ Object description.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
args = ["--generate",
"--cubesize",
str(resolution),
def generate3dLUTFromImage(ramp3dPath, outputPath=None, resolution=32):
+ """
+ Object description.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
if outputPath == None:
outputPath = ramp3dPath + ".spi3d"
outputScale=1.0,
globalParams={},
acesCTLReleaseDir=None):
+ """
+ Object description.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
if len(ctlPaths) > 0:
ctlenv = os.environ
if acesCTLReleaseDir != None:
def convertBitDepth(inputImage, outputImage, depth):
+ """
+ Object description.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
args = [inputImage,
"-d",
depth,
acesCTLReleaseDir=None,
minValue=0.0,
maxValue=1.0):
+ """
+ Object description.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
# print(lutPath)
# print(ctlPaths)
def correctLUTImage(transformedLUTImage, correctedLUTImage, lutResolution):
+ """
+ Object description.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
# open image
transformed = oiio.ImageInput.open(transformedLUTImage)
globalParams={},
cleanup=True,
acesCTLReleaseDir=None):
+ """
+ Object description.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
# print(lutPath)
# print(ctlPaths)
def main():
+ """
+ Object description.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
import optparse
p = optparse.OptionParser(
\r
\r
def readText(textFile):\r
+ """\r
+ Object description.\r
+\r
+ Parameters\r
+ ----------\r
+ parameter : type\r
+ Parameter description.\r
+\r
+ Returns\r
+ -------\r
+ type\r
+ Return value description.\r
+ """\r
+\r
if (textFile != ""):\r
fp = open(textFile, 'rb')\r
# Create a text/plain message\r
return text\r
\r
\r
-# readText\r
-\r
def writeText(text, textFile):\r
+ """\r
+ Object description.\r
+\r
+ Parameters\r
+ ----------\r
+ parameter : type\r
+ Parameter description.\r
+\r
+ Returns\r
+ -------\r
+ type\r
+ Return value description.\r
+ """\r
+\r
if (textFile != ""):\r
fp = open(textFile, 'wb')\r
# Create a text/plain message\r
return text\r
\r
\r
-# readText\r
-\r
class Process:\r
"""\r
- A process with logged output\r
+ A process with logged output.\r
"""\r
\r
def __init__(self,\r
cwd=None,\r
env=None,\r
batchWrapper=False):\r
- """Initialize the standard class variables"""\r
+ """\r
+ Initialize the standard class variables.\r
+\r
+ Parameters\r
+ ----------\r
+ parameter : type\r
+ Parameter description.\r
+\r
+ Returns\r
+ -------\r
+ type\r
+ Return value description.\r
+ """\r
+\r
self.cmd = cmd\r
if not description:\r
self.description = cmd\r
self.batchWrapper = batchWrapper\r
self.processKeys = []\r
\r
- # __init__\r
-\r
def getElapsedSeconds(self):\r
+ """\r
+ Object description.\r
+\r
+ Parameters\r
+ ----------\r
+ parameter : type\r
+ Parameter description.\r
+\r
+ Returns\r
+ -------\r
+ type\r
+ Return value description.\r
+ """\r
+\r
import math\r
\r
if self.end and self.start:\r
formatted = None\r
return formatted\r
\r
- # getElapsedtime\r
-\r
def writeKey(self, writeDict, key=None, value=None, startStop=None):\r
- "Write a key, value pair in a supported format"\r
+ """\r
+ Writes a key / value pair in a supported format.\r
+\r
+ Parameters\r
+ ----------\r
+ parameter : type\r
+ Parameter description.\r
+\r
+ Returns\r
+ -------\r
+ type\r
+ Return value description.\r
+ """\r
+\r
if key != None and (value != None or startStop != None):\r
indent = '\t' * writeDict['indentationLevel']\r
if writeDict['format'] == 'xml':\r
"%s%40s : %s\n" % (indent, key, value))\r
\r
def writeLogHeader(self, writeDict):\r
+ """\r
+ Object description.\r
+\r
+ Parameters\r
+ ----------\r
+ parameter : type\r
+ Parameter description.\r
+\r
+ Returns\r
+ -------\r
+ type\r
+ Return value description.\r
+ """\r
+\r
import platform\r
\r
# Retrieve operating environment information\r
\r
self.writeKey(writeDict, 'description', self.description)\r
self.writeKey(writeDict, 'cmd', self.cmd)\r
- if self.args: self.writeKey(writeDict, 'args', ' '.join(self.args))\r
+ if self.args:\r
+ self.writeKey(writeDict, 'args', ' '.join(self.args))\r
self.writeKey(writeDict, 'start', self.start)\r
self.writeKey(writeDict, 'end', self.end)\r
self.writeKey(writeDict, 'elapsed', self.getElapsedSeconds())\r
\r
self.writeKey(writeDict, 'status', self.status)\r
\r
- # writeLogHeader\r
-\r
def writeLogFooter(self, writeDict):\r
+ """\r
+ Object description.\r
+\r
+ Parameters\r
+ ----------\r
+ parameter : type\r
+ Parameter description.\r
+\r
+ Returns\r
+ -------\r
+ type\r
+ Return value description.\r
+ """\r
+\r
writeDict['indentationLevel'] -= 1\r
self.writeKey(writeDict, 'process', None, 'stop')\r
\r
- # writeLogFooter\r
-\r
def writeLog(self, logHandle=sys.stdout, indentationLevel=0, format='xml'):\r
"""\r
- Write logging information to the specified handle\r
+ Writes logging information to the specified handle.\r
+\r
+ Parameters\r
+ ----------\r
+ parameter : type\r
+ Parameter description.\r
+\r
+ Returns\r
+ -------\r
+ type\r
+ Return value description.\r
"""\r
\r
writeDict = {}\r
\r
self.writeLogFooter(writeDict)\r
\r
- # writeLog\r
-\r
def writeLogToDisk(self, logFilename=None, format='xml', header=None):\r
+ """\r
+ Object description.\r
+\r
+ Parameters\r
+ ----------\r
+ parameter : type\r
+ Parameter description.\r
+\r
+ Returns\r
+ -------\r
+ type\r
+ Return value description.\r
+ """\r
+\r
if logFilename:\r
try:\r
# This also doesn't seem like the best structure...\r
self.writeLog(logHandle)\r
logHandle.close()\r
\r
- # writeLogToDisk\r
-\r
def logLine(self, line):\r
- "Add a line of text to the log"\r
+ """\r
+ Adds a line of text to the log.\r
+\r
+ Parameters\r
+ ----------\r
+ parameter : type\r
+ Parameter description.\r
+\r
+ Returns\r
+ -------\r
+ type\r
+ Return value description.\r
+ """\r
+\r
self.log.append(line.rstrip())\r
if self.echo:\r
print("%s" % line.rstrip())\r
\r
- # logLine\r
-\r
def execute(self):\r
"""\r
- Execute this process\r
+ Executes the current process.\r
+\r
+ Parameters\r
+ ----------\r
+ parameter : type\r
+ Parameter description.\r
+\r
+ Returns\r
+ -------\r
+ type\r
+ Return value description.\r
"""\r
- import re\r
+\r
import datetime\r
import traceback\r
\r
self.status = exitCode\r
\r
self.end = datetime.datetime.now()\r
- # execute\r
\r
\r
-# Process\r
-\r
class ProcessList(Process):\r
"""\r
- A list of processes with logged output\r
+ A list of processes with logged output.\r
"""\r
\r
def __init__(self, description, blocking=True, cwd=None, env=None):\r
+ """\r
+ Object description.\r
+\r
+ Parameters\r
+ ----------\r
+ parameter : type\r
+ Parameter description.\r
+\r
+ Returns\r
+ -------\r
+ type\r
+ Return value description.\r
+ """\r
+\r
Process.__init__(self, description, None, None, cwd, env)\r
"Initialize the standard class variables"\r
self.processes = []\r
self.blocking = blocking\r
\r
- # __init__\r
-\r
def generateReport(self, writeDict):\r
"""\r
- Generate a log based on the success of the child processes\r
+ Generates a log based on the success of the child processes.\r
+\r
+ Parameters\r
+ ----------\r
+ parameter : type\r
+ Parameter description.\r
+\r
+ Returns\r
+ -------\r
+ type\r
+ Return value description.\r
"""\r
+\r
if self.processes:\r
_status = True\r
indent = '\t' * (writeDict['indentationLevel'] + 1)\r
self.status = -1\r
\r
def writeLogHeader(self, writeDict):\r
+ """\r
+ Object description.\r
+\r
+ Parameters\r
+ ----------\r
+ parameter : type\r
+ Parameter description.\r
+\r
+ Returns\r
+ -------\r
+ type\r
+ Return value description.\r
+ """\r
+\r
self.writeKey(writeDict, 'processList', None, 'start')\r
writeDict['indentationLevel'] += 1\r
\r
\r
self.writeKey(writeDict, 'status', self.status)\r
\r
- # writeLogHeader\r
-\r
def writeLogFooter(self, writeDict):\r
+ """\r
+ Object description.\r
+\r
+ Parameters\r
+ ----------\r
+ parameter : type\r
+ Parameter description.\r
+\r
+ Returns\r
+ -------\r
+ type\r
+ Return value description.\r
+ """\r
+\r
writeDict['indentationLevel'] -= 1\r
self.writeKey(writeDict, 'processList', None, 'stop')\r
\r
- # writeLogFooter\r
-\r
def writeLog(self, logHandle=sys.stdout, indentationLevel=0, format='xml'):\r
"""\r
- Write logging information to the specified handle\r
+ Writes logging information to the specified handle.\r
+\r
+ Parameters\r
+ ----------\r
+ parameter : type\r
+ Parameter description.\r
+\r
+ Returns\r
+ -------\r
+ type\r
+ Return value description.\r
"""\r
\r
writeDict = {}\r
\r
self.writeLogFooter(writeDict)\r
\r
- # writeLog\r
-\r
def execute(self):\r
"""\r
- Execute this list of processes\r
+ Executes the list of processes.\r
+\r
+ Parameters\r
+ ----------\r
+ parameter : type\r
+ Parameter description.\r
+\r
+ Returns\r
+ -------\r
+ type\r
+ Return value description.\r
"""\r
+\r
import datetime\r
\r
self.start = datetime.datetime.now()\r
break\r
\r
self.end = datetime.datetime.now()\r
- # execute\r
-\r
\r
-# ProcessList\r
\r
def main():\r
+ """\r
+ Object description.\r
+\r
+ Parameters\r
+ ----------\r
+ parameter : type\r
+ Parameter description.\r
+\r
+ Returns\r
+ -------\r
+ type\r
+ Return value description.\r
+ """\r
+\r
import optparse\r
\r
p = optparse.OptionParser(description='A process logging script',\r
# -*- coding: utf-8 -*-
"""
-Defines unit tests for the generated *ACES* configuration.
+Defines unit tests for *ACES* configuration.
"""
import hashlib
class TestACESConfig(unittest.TestCase):
"""
+ Performs tests on the *ACES* configuration.
"""
def setUp(self):
shutil.rmtree(self.__temporary_directory)
@staticmethod
- def directory_hashes(directory, filters_in=None, filters_out=None):
+ def directory_hashes(directory,
+ filters_in=None,
+ filters_out=None,
+ flags=0):
"""
+ Recursively computes the hashes from the file within given directory.
+
+ Parameters
+ ----------
+ directory : str or unicode
+ Directory to compute the file hashes.
+ filters_in : array_like
+ Included patterns.
+ filters_out : array_like
+ Excluded patterns.
+ flags : int
+ Regex flags.
+
+ Returns
+ -------
+ dict
+ Directory file hashes.
"""
hashes = {}
def test_ACES_config(self):
"""
+ Performs tests on the *ACES* configuration by computing hashes on the
+ generated configuration and comparing them to the existing one.
"""
self.assertTrue(createACESConfig(self.__aces_ocio_ctl_directory,
allocationType=OCIO.Constants.ALLOCATION_UNIFORM,
allocationVars=[0.0, 1.0]):
"""
- Initialize the standard class variables
+ Object description.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
"""
+
self.name = name
self.bitDepth = bitDepth
self.description = description
self.allocationVars = allocationVars
-# Create a 4x4 matrix (list) based on a 3x3 matrix (list) input
def mat44FromMat33(mat33):
+ """
+ Creates a 4x4 matrix from given 3x3 matrix.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
+ """
+
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]
-# TODO: Worth moving to *util.py*.
def filter_words(words, filters_in=None, filters_out=None, flags=0):
"""
+ Object description.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
"""
filtered_words = []
def files_walker(directory, filters_in=None, filters_out=None, flags=0):
"""
+ Object description.
+
+ Parameters
+ ----------
+ parameter : type
+ Parameter description.
+
+ Returns
+ -------
+ type
+ Return value description.
"""
for parent_directory, directories, files in os.walk(directory,
continue
yield path
-
-
-
-