Python
******
->>> from aces_ocio.config import generate_config
+>>> from aces_ocio.generate_config import generate_config
>>> aces_ctl_directory = '/path/to/github/checkout/releases/v1.0.0/transforms/ctl'
>>> config_directory = '/path/to/configuration/dir'
>>> generate_config(aces_ctl_directory, config_directory, 1024, 33, True)
import PyOpenColorIO as ocio
-from aces_ocio.lut import (
+from aces_ocio.generate_lut import (
generate_1d_LUT_from_CTL,
generate_3d_LUT_from_CTL,
write_SPI_1d)
ctls = [os.path.join(aces_ctl_directory,
lmt_values['transformCTLInverse']),
shaper_from_aces_ctl % aces_ctl_directory]
- # TODO: Investigate unresolved `odt_name` reference.
- lut = 'Inverse.%s.%s.spi3d' % (odt_name, shaper_name)
+ lut = 'Inverse.%s.%s.spi3d' % (lmt_name, shaper_name)
lut = sanitize(lut)
for odt in sorted_odts:
(odt_name, odt_values) = odt
- # Defining full range transform for *ODTs* that can only generate
- # either *legal* or *full* output.
+ # Defining full range transform for *ODTs* that can generate either
+ # *legal* or *full* output.
# Uncomment these lines and the lower section and
# flip the `legalRange` value to 1 to restore the old behavior,
import PyOpenColorIO as ocio
-import aces_ocio.lut as genlut
+import aces_ocio.generate_lut as genlut
from aces_ocio.utilities import ColorSpace, mat44_from_mat33, sanitize
__author__ = 'ACES Developers'
import PyOpenColorIO as ocio
-import aces_ocio.lut as genlut
+import aces_ocio.generate_lut as genlut
from aces_ocio.utilities import ColorSpace
__author__ = 'ACES Developers'
import PyOpenColorIO as ocio
-import aces_ocio.lut as genlut
+import aces_ocio.generate_lut as genlut
from aces_ocio.colorspaces import aces
from aces_ocio.utilities import ColorSpace, mat44_from_mat33
import PyOpenColorIO as ocio
-import aces_ocio.lut as genlut
+import aces_ocio.generate_lut as genlut
from aces_ocio.utilities import (ColorSpace, sanitize)
__author__ = 'ACES Developers'
import PyOpenColorIO as ocio
-import aces_ocio.lut as genlut
+import aces_ocio.generate_lut as genlut
from aces_ocio.utilities import ColorSpace
__author__ = 'ACES Developers'
import PyOpenColorIO as ocio
-import aces_ocio.lut as genlut
+import aces_ocio.generate_lut as genlut
from aces_ocio.utilities import ColorSpace, mat44_from_mat33
__author__ = 'ACES Developers'
import PyOpenColorIO as ocio
-import aces_ocio.lut as genlut
+import aces_ocio.generate_lut as genlut
from aces_ocio.utilities import ColorSpace, mat44_from_mat33
__author__ = 'ACES Developers'
config_data['colorSpaces'].append(colorspace)
- print()
+ print('')
def add_looks_to_views(looks,
if aliases:
if reference_data.aliases:
- # TODO: Explain context for following comment.
# Deferring adding alias colorspaces until end, which helps with
- # some applications.
+ # applications listing the colorspaces in the order that they were
+ # defined in the configuration: alias colorspaces are usually named
+ # lower case with spaces but normal colorspaces names are longer
+ # and more verbose, thus it becomes harder for user to visually
+ # parse the list of colorspaces when there are names such as
+ # "crv_canonlog" interspersed with names like
+ # "Input - Canon - Curve - Canon-Log".
+ # Moving the alias colorspace definitions to the end of the
+ # configuration avoids the above problem.
alias_colorspaces.append(
[reference_data, reference_data, reference_data.aliases])
- print()
+ print('')
if look_info:
print('Adding looks')
config_data,
multiple_displays)
- print()
+ print('')
print('Adding regular colorspaces')
if aliases:
if colorspace.aliases:
- # TODO: Explain context for following comment.
# Deferring adding alias colorspaces until end, which helps
- # with some applications.
+ # with applications listing the colorspaces in the order that
+ # they were defined in the configuration.
alias_colorspaces.append(
[reference_data, colorspace, colorspace.aliases])
- print()
+ print('')
- print()
+ print('')
# Adding roles early so that alias colorspaces can be created
# with roles names before remaining colorspace aliases are added
texture_paint=prefixed_names[
config_data['roles']['texture_paint']])
- # TODO: Should we remove this dead code path?
+ # TODO: Pending code path reactivation.
# Not allowed at the moment as role names can not overlap
# with colorspace names.
"""
scene_linear=config_data['roles']['scene_linear'],
texture_paint=config_data['roles']['texture_paint'])
- # TODO: Should we remove this dead code path?
+ # TODO: Pending code path reactivation.
# Not allowed at the moment as role names can not overlap
# with colorspace names.
"""
config, reference_data, role_colorspace, [role_name], 'Roles')
"""
- print()
+ print('')
# Adding alias colorspaces at the end as some applications use
# colorspaces definitions order of the configuration to order
for reference, colorspace, aliases in alias_colorspaces:
add_colorspace_aliases(config, reference, colorspace, aliases)
- print()
+ print('')
print('Adding the diplays and views')
config.setActiveDisplays(','.join(sorted(displays)))
config.setActiveViews(','.join(views))
- print()
+ print('')
# Ensuring the configuration is valid.
config.sanityCheck()
else:
print('3D LUT generation options')
- print('Lut : %s' % lut)
+ print('LUT : %s' % lut)
print('Format : %s' % format)
print('CTLs : %s' % ctls)
- print('Lut Res 1d : %s' % lut_resolution_1d)
- print('Lut Res 3d : %s' % lut_resolution_3d)
+ print('LUT Res 1d : %s' % lut_resolution_1d)
+ print('LUT Res 3d : %s' % lut_resolution_3d)
print('Min Value : %s' % min_value)
print('Max Value : %s' % max_value)
print('Input Scale : %s' % input_scale)
os.path.join(os.path.dirname(__file__), '..', '..')))
from aces_ocio.utilities import files_walker
-from aces_ocio.config import (
+from aces_ocio.generate_config import (
ACES_OCIO_CTL_DIRECTORY_ENVIRON,
generate_config)
# tests.
REFERENCE_CONFIG_ROOT_DIRECTORY = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', '..', '..'))
-REFERENCE_CONFIG_ROOT_DIRECTORY = '/colour-science/colour-ramblings/ocio/aces'
HASH_TEST_PATTERNS = ('\.3dl', '\.lut', '\.csp')
UNHASHABLE_TEST_PATTERNS = ('\.icc', '\.ocio')
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
-from aces_ocio.config import main
+from aces_ocio.generate_config import main
__author__ = 'ACES Developers'
__copyright__ = 'Copyright (C) 2014 - 2015 - ACES Developers'
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
-from aces_ocio.lut import main
+from aces_ocio.generate_lut import main
__author__ = 'ACES Developers'
__copyright__ = 'Copyright (C) 2014 - 2015 - ACES Developers'