X-Git-Url: http://users.mur.at/ms/git/gitweb/?a=blobdiff_plain;f=aces_1.0.0%2Fpython%2Faces_ocio%2Fgenerate_config.py;h=3dcd2c6e522247fcbde709ca9920d08f9c1cb528;hb=3d531dce5348148c92789eebf0d198c42c2a0820;hp=94c681171b7d92e386dab3850b9c4865b687713a;hpb=465abef462555baa505ed88b9e6e3f22b4a9c090;p=OpenColorIO-Configs.git diff --git a/aces_1.0.0/python/aces_ocio/generate_config.py b/aces_1.0.0/python/aces_ocio/generate_config.py index 94c6811..3dcd2c6 100755 --- a/aces_1.0.0/python/aces_ocio/generate_config.py +++ b/aces_1.0.0/python/aces_ocio/generate_config.py @@ -611,7 +611,8 @@ def create_config(config_data, 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: @@ -684,18 +685,16 @@ def create_config(config_data, 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'] @@ -708,12 +707,18 @@ def create_config(config_data, 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( @@ -726,12 +731,10 @@ def create_config(config_data, 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 @@ -746,12 +749,18 @@ def create_config(config_data, 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('') @@ -775,10 +784,6 @@ def create_config(config_data, 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 = [], []