print('Adding regular colorspaces')
- for colorspace in sorted(config_data['colorSpaces']):
+ for colorspace in sorted(config_data['colorSpaces'],
+ cmp=lambda x,y: cmp(x.family.lower(), y.family.lower())):
# Adding the colorspace *Family* into the name which helps with
# applications that presenting colorspaces as one a flat list.
if prefix:
matte_paint=prefixed_names[config_data['roles']['matte_paint']],
reference=prefixed_names[config_data['roles']['reference']],
scene_linear=prefixed_names[config_data['roles']['scene_linear']],
+ compositing_linear=prefixed_names[config_data['roles']['scene_linear']],
+ rendering=prefixed_names[config_data['roles']['scene_linear']],
texture_paint=prefixed_names[
config_data['roles']['texture_paint']])
- # TODO: Pending code path reactivation.
- # Not allowed at the moment as role names can not overlap
- # with colorspace names.
- """
# Add the aliased colorspaces for each role
for role_name, role_colorspace_name in config_data['roles'].iteritems():
role_colorspace_prefixed_name = prefixed_names[role_colorspace_name]
- print( 'Finding colorspace : %s' % role_colorspace_prefixed_name )
+ #print( 'Finding colorspace : %s' % role_colorspace_prefixed_name )
# Find the colorspace pointed to by the role
role_colorspaces = [colorspace
for colorspace in config_data['colorSpaces']
role_colorspace = reference_data
if role_colorspace:
- print( 'Adding an alias colorspace named %s, pointing to %s' % (
- role_name, role_colorspace.name))
+ # The alias colorspace shouldn't match the role name exactly
+ role_name_alias1 = "role_%s" % role_name
+ role_name_alias2 = "Role - %s" % role_name
+
+ print( 'Adding a role colorspace named %s, pointing to %s' % (
+ role_name_alias2, role_colorspace.name))
+
+ alias_colorspaces.append(
+ (reference_data, role_colorspace, [role_name_alias1]))
add_colorspace_aliases(
- config, reference_data, role_colorspace, [role_name], 'Roles')
- """
+ config, reference_data, role_colorspace, [role_name_alias2], 'Roles')
else:
set_config_roles(
matte_paint=config_data['roles']['matte_paint'],
reference=config_data['roles']['reference'],
scene_linear=config_data['roles']['scene_linear'],
+ compositing_linear=config_data['roles']['scene_linear'],
+ rendering=config_data['roles']['scene_linear'],
texture_paint=config_data['roles']['texture_paint'])
- # TODO: Pending code path reactivation.
- # Not allowed at the moment as role names can not overlap
- # with colorspace names.
- """
# Add the aliased colorspaces for each role
for role_name, role_colorspace_name in config_data['roles'].iteritems():
# Find the colorspace pointed to by the role
role_colorspace = reference_data
if role_colorspace:
- print('Adding an alias colorspace named %s, pointing to %s' % (
- role_name, role_colorspace.name))
+ # The alias colorspace shouldn't match the role name exactly
+ role_name_alias1 = "role_%s" % role_name
+ role_name_alias2 = "Role - %s" % role_name
+
+ print('Adding a role colorspace named %s, pointing to %s' % (
+ role_name_alias2, role_colorspace.name))
+
+ alias_colorspaces.append(
+ (reference_data, role_colorspace, [role_name_alias1]))
add_colorspace_aliases(
- config, reference_data, role_colorspace, [role_name], 'Roles')
- """
+ config, reference_data, role_colorspace, [role_name_alias2], 'Roles')
print('')
default_display_views = config_data['displays'][default_display_name]
default_display_colorspace = default_display_views['Output Transform']
- set_config_roles(
- config,
- color_picking=default_display_colorspace.name)
-
# Defining *Displays* and *Views*.
displays, views = [], []
odt_prefix = odt_values['transformUserNamePrefix']
odt_name = odt_values['transformUserName']
+ if odt_name in ['P3-D60 PQ (1000 nits)']:
+ odt_shaper = shaper_name.replace("48 nits", "1000 nits")
+ elif odt_name in ['P3-D60 PQ (2000 nits)']:
+ odt_shaper = shaper_name.replace("48 nits", "2000 nits")
+ elif odt_name in ['P3-D60 PQ (4000 nits)']:
+ odt_shaper = shaper_name.replace("48 nits", "4000 nits")
+ else:
+ odt_shaper = shaper_name
+
# *Photoshop*
for input_space in ['ACEScc', 'ACESproxy']:
args = ['--iconfig', config_path,
odt_name,
input_space)]
if prefix:
- args += ['--shaperspace', 'Utility - %s' % shaper_name,
+ args += ['--shaperspace', 'Utility - %s' % odt_shaper,
'--shapersize', str(lut_resolution_shaper)]
else:
- args += ['--shaperspace', shaper_name,
+ args += ['--shaperspace', odt_shaper,
'--shapersize', str(lut_resolution_shaper)]
args += ['--cubesize', str(lut_resolution_3d)]
args += ['--format',
'%s - %s for %s data' % (
odt_prefix, odt_name, input_space)]
if prefix:
- args += ['--shaperspace', 'Utility - %s' % shaper_name,
+ args += ['--shaperspace', 'Utility - %s' % odt_shaper,
'--shapersize', str(lut_resolution_shaper)]
else:
- args += ['--shaperspace', shaper_name,
+ args += ['--shaperspace', odt_shaper,
'--shapersize', str(lut_resolution_shaper)]
args += ['--cubesize', str(lut_resolution_3d)]
'%s - %s for %s data' % (
odt_prefix, odt_name, input_space)]
if input_space == 'ACEScg':
- lin_shaper_name = '%s - AP1' % shaper_name
+ lin_shaper_name = '%s - AP1' % odt_shaper
else:
- lin_shaper_name = shaper_name
+ lin_shaper_name = odt_shaper
if prefix:
lin_shaper_name = 'Utility - %s' % lin_shaper_name
args += ['--shaperspace', lin_shaper_name,
look_info=None,
copy_custom_luts=True,
cleanup=True,
- prefix_colorspaces_with_family_names=True):
+ prefix_colorspaces_with_family_names=True,
+ shaper_base_name='Log2'):
"""
Creates the ACES configuration.
odt_info = aces.get_ODTs_info(aces_ctl_directory)
lmt_info = aces.get_LMTs_info(aces_ctl_directory)
- shaper_name = 'Output Shaper'
+ if shaper_base_name == 'DolbyPQ':
+ shaper_name = 'Dolby PQ 48 nits Shaper'
+ else:
+ shaper_name = 'Log2 48 nits Shaper'
+
config_data = create_config_data(odt_info,
lmt_info,
shaper_name,
'ACEScc colorspace, but the user could choose other spaces '
'by changing the argument after the name of the look. \n')
usage += '\n'
-
+ usage += ('Create a GUI-friendly ACES 1.0 config using the Dolby PQ '
+ 'transfer function as the shaper: \n')
+ usage += ('\tcreate_aces_config -a /path/to/aces-dev/transforms/ctl '
+ '--lutResolution1d 1024 --lutResolution3d 33 -c aces_1.0.0 '
+ '--shaper DolbyPQ')
+ usage += '\n'
+
look_info = []
def look_info_callback(option, opt_str, value, parser):
action='callback', callback=look_info_callback)
p.add_option('--copyCustomLUTs', action='store_true', default=False)
+ p.add_option('--shaper', '-s', default='Log2')
+
options, arguments = p.parse_args()
aces_ctl_directory = options.acesCTLDir
cleanup_temp_images = not options.keepTempImages
multiple_displays = options.createMultipleDisplays
copy_custom_luts = options.copyCustomLUTs
+ shaper_base_name = options.shaper
+ prefix = True
print(look_info)
multiple_displays,
look_info,
copy_custom_luts,
- cleanup_temp_images)
+ cleanup_temp_images,
+ prefix,
+ shaper_base_name)
if __name__ == '__main__':