Skip to content

Commit 8a835c1

Browse files
authored
PR: Display Family (#19)
* Ensure that analytical config builds properly. Signed-off-by: Thomas Mansencal <[email protected]> * Update "aces-dev" to v1.3. Signed-off-by: Thomas Mansencal <[email protected]> * Ensure that display colorspaces family is set to "Display". Closes #18. Signed-off-by: Thomas Mansencal <[email protected]>
1 parent 656a301 commit 8a835c1

File tree

5 files changed

+34
-16
lines changed

5 files changed

+34
-16
lines changed

opencolorio_config_aces/config/generation/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ class ConfigData:
359359
file_rules: Union[list, tuple] = field(default_factory=list)
360360
viewing_rules: Union[list, tuple] = field(default_factory=list)
361361
inactive_colorspaces: Union[list, tuple] = field(default_factory=list)
362-
default_view_transform: str = field(default_factory=None)
362+
default_view_transform: str = field(default_factory=str)
363363

364364

365365
def validate_config(config):

opencolorio_config_aces/config/reference/generate/analytical.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,13 +267,13 @@ def generate_config_aces(config_name=None,
267267
views = []
268268

269269
scene_reference_colorspace = colorspace_factory(
270-
f'ACES - {ACES_CONFIG_REFERENCE_COLORSPACE}',
270+
f'CSC - {ACES_CONFIG_REFERENCE_COLORSPACE}',
271271
'ACES',
272272
description='The "Academy Color Encoding System" reference colorspace.'
273273
)
274274

275275
display_reference_colorspace = colorspace_factory(
276-
f'ACES - {ACES_CONFIG_OUTPUT_ENCODING_COLORSPACE}',
276+
f'CSC - {ACES_CONFIG_OUTPUT_ENCODING_COLORSPACE}',
277277
'ACES',
278278
description='The "Output Color Encoding Specification" colorspace.',
279279
from_reference=node_to_builtin_transform(
@@ -335,15 +335,15 @@ def generate_config_aces(config_name=None,
335335
data = ConfigData(
336336
description='The "Academy Color Encoding System" reference config.',
337337
roles={
338-
ocio.ROLE_SCENE_LINEAR: 'ACES - ACEScg',
338+
ocio.ROLE_SCENE_LINEAR: 'CSC - ACEScg',
339339
},
340340
colorspaces=colorspaces,
341341
views=views,
342342
active_displays=displays,
343343
active_views=list(dict.fromkeys([view['view'] for view in views])),
344344
file_rules=[{
345345
'name': 'Default',
346-
'colorspace': 'ACES - ACEScg'
346+
'colorspace': 'CSC - ACEScg'
347347
}],
348348
profile_version=2)
349349

opencolorio_config_aces/config/reference/generate/config.py

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
'ACES_CONFIG_COLORSPACE_NAME_SEPARATOR',
4141
'ACES_CONFIG_COLORSPACE_FAMILY_SEPARATOR',
4242
'ACES_CONFIG_BUILTIN_TRANSFORM_NAME_SEPARATOR',
43-
'COLORSPACE_NAME_SUBSTITUTION_PATTERNS', 'LOOK_NAME_SUBSTITUTION_PATTERNS',
43+
'ACES_CONFIG_DISPLAY_FAMILY', 'COLORSPACE_NAME_SUBSTITUTION_PATTERNS',
44+
'LOOK_NAME_SUBSTITUTION_PATTERNS',
4445
'TRANSFORM_FAMILY_SUBSTITUTION_PATTERNS',
4546
'VIEW_TRANSFORM_NAME_SUBSTITUTION_PATTERNS',
4647
'DISPLAY_NAME_SUBSTITUTION_PATTERNS', 'ColorspaceDescriptionStyle',
@@ -98,6 +99,13 @@
9899
ACES_CONFIG_BUILTIN_TRANSFORM_NAME_SEPARATOR : unicode
99100
"""
100101

102+
ACES_CONFIG_DISPLAY_FAMILY = 'Display'
103+
"""
104+
*OpenColorIO* config display family.
105+
106+
ACES_CONFIG_DISPLAY_FAMILY : unicode
107+
"""
108+
101109
COLORSPACE_NAME_SUBSTITUTION_PATTERNS = {
102110
'ACES_0_1_1': 'ACES 0.1.1',
103111
'ACES_0_2_2': 'ACES 0.2.2',
@@ -797,9 +805,11 @@ class instances corresponding to the given style.
797805

798806
description = '\n'.join(description)
799807

800-
return view_transform_factory(
808+
view_transform = view_transform_factory(
801809
name, from_reference=builtin_transform, description=description)
802810

811+
return view_transform
812+
803813

804814
@required('OpenColorIO')
805815
def style_to_display_colorspace(
@@ -828,6 +838,8 @@ def style_to_display_colorspace(
828838

829839
import PyOpenColorIO as ocio
830840

841+
kwargs.setdefault('family', ACES_CONFIG_DISPLAY_FAMILY)
842+
831843
name = beautify_display_name(style)
832844
builtin_transform = ocio.BuiltinTransform(style)
833845

@@ -842,12 +854,18 @@ def style_to_display_colorspace(
842854

843855
description = '\n'.join(description)
844856

845-
return colorspace_factory(
846-
name,
847-
from_reference=builtin_transform,
848-
reference_space=ocio.REFERENCE_SPACE_DISPLAY,
849-
description=description,
850-
**kwargs)
857+
settings = {
858+
'name': name,
859+
'family': ACES_CONFIG_DISPLAY_FAMILY,
860+
'description': description,
861+
'from_reference': builtin_transform,
862+
'reference_space': ocio.REFERENCE_SPACE_DISPLAY,
863+
}
864+
settings.update(kwargs)
865+
866+
colorspace = colorspace_factory(**settings)
867+
868+
return colorspace
851869

852870

853871
@required('OpenColorIO')

opencolorio_config_aces/config/reference/generate/resources/OpenColorIO-ACES-Config Transforms - Reference Config - Mapping.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Ordering,ACEStransformID,BuiltinTransform Style,Linked DisplayColorSpace Style,I
1010
130,urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.LogC_EI800_AWG_to_ACES.a1.1.0,ARRI_ALEXA-LOGC-EI800-AWG_to_ACES2065-1,,ColorSpace,log,file-io
1111
140,urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.SLog3_SGamut3_to_ACES.a1.1.0,SONY_SLOG3-SGAMUT3_to_ACES2065-1,,ColorSpace,log,file-io
1212
140,urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.SLog3_SGamut3Cine_to_ACES.a1.1.0,SONY_SLOG3-SGAMUT3.CINE_to_ACES2065-1,,ColorSpace,log,file-io
13+
140,urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.SLog3_Venice_SGamut3_to_ACES.a1.1.0,SONY_SLOG3-SGAMUT3-VENICE_to_ACES2065-1,,ColorSpace,log,file-io
14+
140,urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.SLog3_Venice_SGamut3Cine_to_ACES.a1.1.0,SONY_SLOG3-SGAMUT3.CINE-VENICE_to_ACES2065-1,,ColorSpace,log,file-io
1315
150,urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.VLog_VGamut_to_ACES.a1.1.0,PANASONIC_VLOG-VGAMUT_to_ACES2065-1,,ColorSpace,log,file-io
14-
240,urn:ampas:aces:transformId:v1.5:IDT.Sony.Venice_SLog3_SGamut3.a1.v1,SONY_SLOG3-SGAMUT3-VENICE_to_ACES2065-1,,ColorSpace,log,file-io
15-
240,urn:ampas:aces:transformId:v1.5:IDT.Sony.Venice_SLog3_SGamut3Cine.a1.v1,SONY_SLOG3-SGAMUT3.CINE-VENICE_to_ACES2065-1,,ColorSpace,log,file-io
1616
310,urn:ampas:aces:transformId:v1.5:LMT.Academy.BlueLightArtifactFix.a1.1.0,ACES-LMT - BLUE_LIGHT_ARTIFACT_FIX,,Look,,
1717
400,urn:ampas:aces:transformId:v1.5:ODT.Academy.RGBmonitor_100nits_dim.a1.0.3,ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - SDR-VIDEO_1.0,DISPLAY - CIE-XYZ-D65_to_sRGB,ViewTransform,sdr-video,file-io
1818
400,urn:ampas:aces:transformId:v1.5:ODT.Academy.RGBmonitor_D60sim_100nits_dim.a1.0.3,ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - SDR-VIDEO-D60sim-D65_1.0,DISPLAY - CIE-XYZ-D65_to_sRGB,ViewTransform,sdr-video,file-io

0 commit comments

Comments
 (0)