Skip to content

Commit 465abef

Browse files
committed
Implement code review notes.
1 parent 0c69264 commit 465abef

14 files changed

Lines changed: 39 additions & 34 deletions

File tree

aces_1.0.0/python/aces_ocio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
Python
1212
******
1313
14-
>>> from aces_ocio.config import generate_config
14+
>>> from aces_ocio.generate_config import generate_config
1515
>>> aces_ctl_directory = '/path/to/github/checkout/releases/v1.0.0/transforms/ctl'
1616
>>> config_directory = '/path/to/configuration/dir'
1717
>>> generate_config(aces_ctl_directory, config_directory, 1024, 33, True)

aces_1.0.0/python/aces_ocio/colorspaces/aces.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import PyOpenColorIO as ocio
1818

19-
from aces_ocio.lut import (
19+
from aces_ocio.generate_lut import (
2020
generate_1d_LUT_from_CTL,
2121
generate_3d_LUT_from_CTL,
2222
write_SPI_1d)
@@ -737,8 +737,7 @@ def create_ACES_LMT(lmt_name,
737737
ctls = [os.path.join(aces_ctl_directory,
738738
lmt_values['transformCTLInverse']),
739739
shaper_from_aces_ctl % aces_ctl_directory]
740-
# TODO: Investigate unresolved `odt_name` reference.
741-
lut = 'Inverse.%s.%s.spi3d' % (odt_name, shaper_name)
740+
lut = 'Inverse.%s.%s.spi3d' % (lmt_name, shaper_name)
742741

743742
lut = sanitize(lut)
744743

@@ -1200,8 +1199,8 @@ def create_ODTs(aces_ctl_directory,
12001199
for odt in sorted_odts:
12011200
(odt_name, odt_values) = odt
12021201

1203-
# Defining full range transform for *ODTs* that can only generate
1204-
# either *legal* or *full* output.
1202+
# Defining full range transform for *ODTs* that can generate either
1203+
# *legal* or *full* output.
12051204

12061205
# Uncomment these lines and the lower section and
12071206
# flip the `legalRange` value to 1 to restore the old behavior,

aces_1.0.0/python/aces_ocio/colorspaces/arri.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
import PyOpenColorIO as ocio
1515

16-
import aces_ocio.lut as genlut
16+
import aces_ocio.generate_lut as genlut
1717
from aces_ocio.utilities import ColorSpace, mat44_from_mat33, sanitize
1818

1919
__author__ = 'ACES Developers'

aces_1.0.0/python/aces_ocio/colorspaces/canon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import PyOpenColorIO as ocio
1414

15-
import aces_ocio.lut as genlut
15+
import aces_ocio.generate_lut as genlut
1616
from aces_ocio.utilities import ColorSpace
1717

1818
__author__ = 'ACES Developers'

aces_1.0.0/python/aces_ocio/colorspaces/general.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import PyOpenColorIO as ocio
1414

15-
import aces_ocio.lut as genlut
15+
import aces_ocio.generate_lut as genlut
1616
from aces_ocio.colorspaces import aces
1717
from aces_ocio.utilities import ColorSpace, mat44_from_mat33
1818

aces_1.0.0/python/aces_ocio/colorspaces/gopro.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import PyOpenColorIO as ocio
1414

15-
import aces_ocio.lut as genlut
15+
import aces_ocio.generate_lut as genlut
1616
from aces_ocio.utilities import (ColorSpace, sanitize)
1717

1818
__author__ = 'ACES Developers'

aces_1.0.0/python/aces_ocio/colorspaces/panasonic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
import PyOpenColorIO as ocio
1313

14-
import aces_ocio.lut as genlut
14+
import aces_ocio.generate_lut as genlut
1515
from aces_ocio.utilities import ColorSpace
1616

1717
__author__ = 'ACES Developers'

aces_1.0.0/python/aces_ocio/colorspaces/red.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import PyOpenColorIO as ocio
1414

15-
import aces_ocio.lut as genlut
15+
import aces_ocio.generate_lut as genlut
1616
from aces_ocio.utilities import ColorSpace, mat44_from_mat33
1717

1818
__author__ = 'ACES Developers'

aces_1.0.0/python/aces_ocio/colorspaces/sony.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import PyOpenColorIO as ocio
1414

15-
import aces_ocio.lut as genlut
15+
import aces_ocio.generate_lut as genlut
1616
from aces_ocio.utilities import ColorSpace, mat44_from_mat33
1717

1818
__author__ = 'ACES Developers'

aces_1.0.0/python/aces_ocio/config.py renamed to aces_1.0.0/python/aces_ocio/generate_config.py

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ def add_look(config,
419419

420420
config_data['colorSpaces'].append(colorspace)
421421

422-
print()
422+
print('')
423423

424424

425425
def add_looks_to_views(looks,
@@ -575,13 +575,20 @@ def create_config(config_data,
575575

576576
if aliases:
577577
if reference_data.aliases:
578-
# TODO: Explain context for following comment.
579578
# Deferring adding alias colorspaces until end, which helps with
580-
# some applications.
579+
# applications listing the colorspaces in the order that they were
580+
# defined in the configuration: alias colorspaces are usually named
581+
# lower case with spaces but normal colorspaces names are longer
582+
# and more verbose, thus it becomes harder for user to visually
583+
# parse the list of colorspaces when there are names such as
584+
# "crv_canonlog" interspersed with names like
585+
# "Input - Canon - Curve - Canon-Log".
586+
# Moving the alias colorspace definitions to the end of the
587+
# configuration avoids the above problem.
581588
alias_colorspaces.append(
582589
[reference_data, reference_data, reference_data.aliases])
583590

584-
print()
591+
print('')
585592

586593
if look_info:
587594
print('Adding looks')
@@ -600,7 +607,7 @@ def create_config(config_data,
600607
config_data,
601608
multiple_displays)
602609

603-
print()
610+
print('')
604611

605612
print('Adding regular colorspaces')
606613

@@ -649,15 +656,15 @@ def create_config(config_data,
649656

650657
if aliases:
651658
if colorspace.aliases:
652-
# TODO: Explain context for following comment.
653659
# Deferring adding alias colorspaces until end, which helps
654-
# with some applications.
660+
# with applications listing the colorspaces in the order that
661+
# they were defined in the configuration.
655662
alias_colorspaces.append(
656663
[reference_data, colorspace, colorspace.aliases])
657664

658-
print()
665+
print('')
659666

660-
print()
667+
print('')
661668

662669
# Adding roles early so that alias colorspaces can be created
663670
# with roles names before remaining colorspace aliases are added
@@ -680,7 +687,7 @@ def create_config(config_data,
680687
texture_paint=prefixed_names[
681688
config_data['roles']['texture_paint']])
682689

683-
# TODO: Should we remove this dead code path?
690+
# TODO: Pending code path reactivation.
684691
# Not allowed at the moment as role names can not overlap
685692
# with colorspace names.
686693
"""
@@ -721,7 +728,7 @@ def create_config(config_data,
721728
scene_linear=config_data['roles']['scene_linear'],
722729
texture_paint=config_data['roles']['texture_paint'])
723730

724-
# TODO: Should we remove this dead code path?
731+
# TODO: Pending code path reactivation.
725732
# Not allowed at the moment as role names can not overlap
726733
# with colorspace names.
727734
"""
@@ -746,7 +753,7 @@ def create_config(config_data,
746753
config, reference_data, role_colorspace, [role_name], 'Roles')
747754
"""
748755

749-
print()
756+
print('')
750757

751758
# Adding alias colorspaces at the end as some applications use
752759
# colorspaces definitions order of the configuration to order
@@ -758,7 +765,7 @@ def create_config(config_data,
758765
for reference, colorspace, aliases in alias_colorspaces:
759766
add_colorspace_aliases(config, reference, colorspace, aliases)
760767

761-
print()
768+
print('')
762769

763770
print('Adding the diplays and views')
764771

@@ -890,7 +897,7 @@ def create_config(config_data,
890897
config.setActiveDisplays(','.join(sorted(displays)))
891898
config.setActiveViews(','.join(views))
892899

893-
print()
900+
print('')
894901

895902
# Ensuring the configuration is valid.
896903
config.sanityCheck()

0 commit comments

Comments
 (0)