- # Add the legal and full variations into this list
- odtInfoC = dict(odtInfo)
- for odtCTLName, odtValues in odtInfo.iteritems():
- if odtCTLName in ['Academy.Rec2020_100nits_dim.a1.0.0',
- 'Academy.Rec709_100nits_dim.a1.0.0',
- 'Academy.Rec709_D60sim_100nits_dim.a1.0.0']:
- odtName = odtValues["transformUserName"]
-
- odtValuesLegal = dict(odtValues)
- odtValuesLegal["transformUserName"] = "%s - Legal" % odtName
- odtInfoC["%s - Legal" % odtCTLName] = odtValuesLegal
-
- odtValuesFull = dict(odtValues)
- odtValuesFull["transformUserName"] = "%s - Full" % odtName
- odtInfoC["%s - Full" % odtCTLName] = odtValuesFull
-
- del (odtInfoC[odtCTLName])
-
- for odtCTLName, odtValues in odtInfoC.iteritems():
- odtPrefix = odtValues["transformUserNamePrefix"]
- odtName = odtValues["transformUserName"]
-
- # For Photoshop
- for inputspace in ["ACEScc", "ACESproxy"]:
- args = ["--iconfig", configPath, "-v", "--inputspace", inputspace]
- args += ["--outputspace", "%s" % odtName]
- args += ["--description",
- "%s - %s for %s data" % (odtPrefix, odtName, inputspace)]
- args += ["--shaperspace", shaperName, "--shapersize",
- str(lutResolutionShaper)]
- args += ["--cubesize", str(lutResolution3d)]
- args += ["--format", "icc", "%s/photoshop/%s for %s.icc" % (
- bakedDir, odtName, inputspace)]
-
- bakeLUT = Process(description="bake a LUT", cmd="ociobakelut",
- args=args)
- bakeLUT.execute()
-
- # For Flame, Lustre
- for inputspace in ["ACEScc", "ACESproxy"]:
- args = ["--iconfig", configPath, "-v", "--inputspace", inputspace]
- args += ["--outputspace", "%s" % odtName]
- args += ["--description",
- "%s - %s for %s data" % (odtPrefix, odtName, inputspace)]
- args += ["--shaperspace", shaperName, "--shapersize",
- str(lutResolutionShaper)]
- args += ["--cubesize", str(lutResolution3d)]
-
- fargs = ["--format", "flame", "%s/flame/%s for %s Flame.3dl" % (
- bakedDir, odtName, inputspace)]
- bakeLUT = Process(description="bake a LUT", cmd="ociobakelut",
- args=(args + fargs))
- bakeLUT.execute()
-
- largs = ["--format", "lustre", "%s/lustre/%s for %s Lustre.3dl" % (
- bakedDir, odtName, inputspace)]
- bakeLUT = Process(description="bake a LUT", cmd="ociobakelut",
- args=(args + largs))
- bakeLUT.execute()
-
- # For Maya, Houdini
- for inputspace in ["ACEScg", "ACES2065-1"]:
- args = ["--iconfig", configPath, "-v", "--inputspace", inputspace]
- args += ["--outputspace", "%s" % odtName]
- args += ["--description",
- "%s - %s for %s data" % (odtPrefix, odtName, inputspace)]
- if inputspace == 'ACEScg':
- linShaperName = "%s - AP1" % shaperName
+ odt_info_C = dict(odt_info)
+ for odt_CTL_name, odt_values in odt_info.iteritems():
+ if odt_CTL_name in ['Academy.Rec2020_100nits_dim.a1.0.0',
+ 'Academy.Rec709_100nits_dim.a1.0.0',
+ 'Academy.Rec709_D60sim_100nits_dim.a1.0.0']:
+ odt_name = odt_values['transformUserName']
+
+ odt_values_legal = dict(odt_values)
+ odt_values_legal['transformUserName'] = '%s - Legal' % odt_name
+ odt_info_C['%s - Legal' % odt_CTL_name] = odt_values_legal
+
+ odt_values_full = dict(odt_values)
+ odt_values_full['transformUserName'] = '%s - Full' % odt_name
+ odt_info_C['%s - Full' % odt_CTL_name] = odt_values_full
+
+ del (odt_info_C[odt_CTL_name])
+
+ for odt_CTL_name, odt_values in odt_info_C.iteritems():
+ odt_prefix = odt_values['transformUserNamePrefix']
+ odt_name = odt_values['transformUserName']
+
+ # *Photoshop*
+ for input_space in ['ACEScc', 'ACESproxy']:
+ args = ['--iconfig', config_path,
+ '-v',
+ '--inputspace', input_space]
+ args += ['--outputspace', '%s' % odt_name]
+ args += ['--description',
+ '%s - %s for %s data' % (odt_prefix,
+ odt_name,
+ input_space)]
+ args += ['--shaperspace', shaper_name,
+ '--shapersize', str(lut_resolution_shaper)]
+ args += ['--cubesize', str(lut_resolution_3d)]
+ args += ['--format',
+ 'icc',
+ os.path.join(baked_directory,
+ 'photoshop',
+ '%s for %s.icc' % (odt_name, input_space))]
+
+ bake_LUT = Process(description='bake a LUT',
+ cmd='ociobakelut',
+ args=args)
+ bake_LUT.execute()
+
+ # *Flame*, *Lustre*
+ for input_space in ['ACEScc', 'ACESproxy']:
+ args = ['--iconfig', config_path,
+ '-v',
+ '--inputspace', input_space]
+ args += ['--outputspace', '%s' % odt_name]
+ args += ['--description',
+ '%s - %s for %s data' % (
+ odt_prefix, odt_name, input_space)]
+ args += ['--shaperspace', shaper_name,
+ '--shapersize', str(lut_resolution_shaper)]
+ args += ['--cubesize', str(lut_resolution_3d)]
+
+ fargs = ['--format',
+ 'flame',
+ os.path.join(
+ baked_directory,
+ 'flame',
+ '%s for %s Flame.3dl' % (odt_name, input_space))]
+ bake_LUT = Process(description='bake a LUT',
+ cmd='ociobakelut',
+ args=(args + fargs))
+ bake_LUT.execute()
+
+ largs = ['--format',
+ 'lustre',
+ os.path.join(
+ baked_directory,
+ 'lustre',
+ '%s for %s Lustre.3dl' % (odt_name, input_space))]
+ bake_LUT = Process(description='bake a LUT',
+ cmd='ociobakelut',
+ args=(args + largs))
+ bake_LUT.execute()
+
+ # *Maya*, *Houdini*
+ for input_space in ['ACEScg', 'ACES2065-1']:
+ args = ['--iconfig', config_path,
+ '-v',
+ '--inputspace', input_space]
+ args += ['--outputspace', '%s' % odt_name]
+ args += ['--description',
+ '%s - %s for %s data' % (
+ odt_prefix, odt_name, input_space)]
+ if input_space == 'ACEScg':
+ lin_shaper_name = '%s - AP1' % shaper_name