Added support for including the ACES transform ID in the colorspace description....
[OpenColorIO-Configs.git] / aces_1.0.0 / python / aces_ocio / colorspaces / aces.py
index decddd6..174b96c 100644 (file)
@@ -125,12 +125,13 @@ def create_ACEScc(aces_ctl_directory,
 
     cs = ColorSpace(name)
     cs.description = 'The %s color space' % name
-    cs.aliases = ["acescc_ap1"]
+    cs.aliases = ["acescc", "acescc_ap1"]
     cs.equality_group = ''
     cs.family = 'ACES'
     cs.is_data = False
     cs.allocation_type = ocio.Constants.ALLOCATION_UNIFORM
     cs.allocation_vars = [min_value, max_value]
+    cs.aces_transform_id = "ACEScsc.ACEScc_to_ACES.a1.0.0"
 
     ctls = [os.path.join(aces_ctl_directory,
                          'ACEScc',
@@ -191,11 +192,13 @@ def create_ACESproxy(aces_ctl_directory,
 
     cs = ColorSpace(name)
     cs.description = 'The %s color space' % name
-    cs.aliases = ["acesproxy_ap1"]
+    cs.aliases = ["acesproxy", "acesproxy_ap1"]
     cs.equality_group = ''
     cs.family = 'ACES'
     cs.is_data = False
 
+    cs.aces_transform_id = "ACEScsc.ACESproxy10i_to_ACES.a1.0.0"
+
     ctls = [os.path.join(aces_ctl_directory,
                          'ACESproxy',
                          'ACEScsc.ACESproxy10i_to_ACES.a1.0.0.ctl'),
@@ -264,13 +267,15 @@ def create_ACEScg(aces_ctl_directory,
 
     cs = ColorSpace(name)
     cs.description = 'The %s color space' % name
-    cs.aliases = ["lin_ap1"]
+    cs.aliases = ["acescg", "lin_ap1"]
     cs.equality_group = ''
     cs.family = 'ACES'
     cs.is_data = False
     cs.allocation_type = ocio.Constants.ALLOCATION_LG2
     cs.allocation_vars = [-8, 5, 0.00390625]
 
+    cs.aces_transform_id = "ACEScsc.ACEScg_to_ACES.a1.0.0"
+
     cs.to_reference_transforms = []
 
     # *AP1* primaries to *AP0* primaries.
@@ -280,6 +285,13 @@ def create_ACEScg(aces_ctl_directory,
         'direction': 'forward'})
 
     cs.from_reference_transforms = []
+
+    # *AP1* primaries to *AP0* primaries.
+    cs.from_reference_transforms.append({
+        'type': 'matrix',
+        'matrix': mat44_from_mat33(ACES_AP0_TO_AP1),
+        'direction': 'forward'})
+
     return cs
 
 
@@ -313,6 +325,8 @@ def create_ADX(lut_directory,
     cs.is_data = False
 
     if bit_depth == 10:
+        cs.aces_transform_id = "ACEScsc.ADX10_to_ACES.a1.0.0"
+
         cs.bit_depth = ocio.Constants.BIT_DEPTH_UINT10
         ADX_to_CDD = [1023 / 500, 0, 0, 0,
                       0, 1023 / 500, 0, 0,
@@ -320,6 +334,8 @@ def create_ADX(lut_directory,
                       0, 0, 0, 1]
         offset = [-95 / 500, -95 / 500, -95 / 500, 0]
     elif bit_depth == 16:
+        cs.aces_transform_id = "ACEScsc.ADX16_to_ACES.a1.0.0"
+
         cs.bit_depth = ocio.Constants.BIT_DEPTH_UINT16
         ADX_to_CDD = [65535 / 8000, 0, 0, 0,
                       0, 65535 / 8000, 0, 0,
@@ -859,6 +875,8 @@ def create_ACES_RRT_plus_ODT(odt_name,
     cs.family = 'Output'
     cs.is_data = False
 
+    cs.aces_transform_id = odt_values['transformID']
+
     pprint.pprint(odt_values)
 
     # Generating the *shaper* transform.
@@ -1199,7 +1217,7 @@ def create_ODTs(aces_ctl_directory,
         colorspaces.append(cs)
 
         displays[odt_name_legal] = {
-            'Linear': linear_display_space,
+            'Raw': linear_display_space,
             'Log': log_display_space,
             'Output Transform': cs}
 
@@ -1228,7 +1246,7 @@ def create_ODTs(aces_ctl_directory,
             colorspaces.append(cs_full)
 
             displays[odt_name_full] = {
-                'Linear': linear_display_space,
+                'Raw': linear_display_space,
                 'Log': log_display_space,
                 'Output Transform': cs_full}
 
@@ -1524,7 +1542,7 @@ def create_colorspaces(aces_ctl_directory,
              'default': ACES.name,
              'matte_paint': ACEScc.name,
              'reference': '',
-             'scene_linear': ACES.name,
+             'scene_linear': ACEScg.name,
              'texture_paint': ''}
 
     return ACES, colorspaces, displays, ACEScc, roles, defaultDisplay