Improve loop construct.
[OpenColorIO-Configs.git] / aces_1.0.0 / python / aces_ocio / aces_config.py
index 77df1a2..7c067ce 100755 (executable)
@@ -173,11 +173,6 @@ def generate_OCIO_transform(transforms):
          Return value description.
     """
 
-    interpolation_options = {
-        'linear': ocio.Constants.INTERP_LINEAR,
-        'nearest': ocio.Constants.INTERP_NEAREST,
-        'tetrahedral': ocio.Constants.INTERP_TETRAHEDRAL}
-
     direction_options = {
         'forward': ocio.Constants.TRANSFORM_DIR_FORWARD,
         'inverse': ocio.Constants.TRANSFORM_DIR_INVERSE}
@@ -318,7 +313,7 @@ def add_colorspace_aliases(config,
         if alias_name.lower() == colorspace.name.lower():
             print('Skipping alias creation for %s, alias %s, '
                   'because lower cased names match' % (
-                colorspace.name, alias_name))
+                      colorspace.name, alias_name))
             continue
 
         print('Adding alias colorspace space %s, alias to %s' % (
@@ -368,11 +363,9 @@ def add_colorspace_aliases(config,
 
 def add_look(config,
              look,
-             prefix,
              custom_lut_dir,
              reference_name,
-             config_data,
-             multiple_displays=False):
+             config_data):
     """
     Object description.
 
@@ -451,8 +444,7 @@ def add_look(config,
     print()
 
 
-def integrate_looks_into_views(config,
-                               looks,
+def integrate_looks_into_views(looks,
                                reference_name,
                                config_data,
                                multiple_displays=False):
@@ -495,7 +487,7 @@ def integrate_looks_into_views(config,
                     output_colorspace_c = copy.deepcopy(output_colorspace)
 
                     # for look_name in look_names:
-                    for i in range(len(look_names)):
+                    for i, look_name in enumerate(look_names):
                         look_name = look_names[i]
 
                         # Add the LookTransform to the head of the
@@ -526,7 +518,7 @@ def integrate_looks_into_views(config,
 
                     look_names_string = ', '.join(look_names)
                     output_colorspace_c.name = '%s with %s' % (
-                    output_colorspace.name, look_names_string)
+                        output_colorspace.name, look_names_string)
                     output_colorspace_c.aliases = [
                         'out_%s' % compact(output_colorspace_c.name)]
 
@@ -637,14 +629,12 @@ def create_config(config_data,
         for look in look_info:
             add_look(config,
                      look,
-                     prefix,
                      custom_lut_dir,
                      reference_data.name,
                      config_data)
 
         # Integrate looks with displays, views
-        integrate_looks_into_views(config,
-                                   look_info,
+        integrate_looks_into_views(look_info,
                                    reference_data.name,
                                    config_data,
                                    multiple_displays)
@@ -893,7 +883,7 @@ def create_config(config_data,
                     if 'with' in view_name:
                         # Integrate looks into view name
                         display_cleaned = '%s with %s' % (
-                        display_cleaned, look_names)
+                            display_cleaned, look_names)
 
                         views_with_looks_at_end = False
                         # Storing combo of display, view and colorspace name
@@ -1099,8 +1089,7 @@ def generate_LUTs(odt_info,
     # General Color Spaces
     # -------------------------------------------------------------------------
     general_colorspaces = general.create_colorspaces(lut_directory,
-                                                     lut_resolution_1d,
-                                                     lut_resolution_3d)
+                                                     lut_resolution_1d)
     for cs in general_colorspaces:
         config_data['colorSpaces'].append(cs)
 
@@ -1121,7 +1110,6 @@ def generate_baked_LUTs(odt_info,
                         shaper_name,
                         baked_directory,
                         config_path,
-                        lut_resolution_1d,
                         lut_resolution_3d,
                         lut_resolution_shaper=1024,
                         prefix=False):
@@ -1392,7 +1380,6 @@ def create_ACES_config(aces_ctl_directory,
                             shaper_name,
                             os.path.join(config_directory, 'baked'),
                             os.path.join(config_directory, 'config.ocio'),
-                            lut_resolution_1d,
                             lut_resolution_3d,
                             lut_resolution_1d,
                             prefix=prefix_colorspaces_with_family_names)