+ # defer adding alias colorspaces until end.
+ # Helps with some applications.
+ alias_colorspaces.append(
+ [reference_data, colorspace, colorspace.aliases])
+
+ print()
+
+ print()
+
+ #
+ # We add roles early so we can create alias colorspaces with the names
+ # of the roles before the rest of the colorspace aliases are added
+ # to the config.
+ print('Setting the roles')
+
+ if prefix:
+ set_config_default_roles(
+ config,
+ color_picking=prefixed_names[
+ config_data['roles']['color_picking']],
+ color_timing=prefixed_names[config_data['roles']['color_timing']],
+ compositing_log=prefixed_names[
+ config_data['roles']['compositing_log']],
+ data=prefixed_names[config_data['roles']['data']],
+ default=prefixed_names[config_data['roles']['default']],
+ 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']],
+ texture_paint=prefixed_names[
+ config_data['roles']['texture_paint']])
+
+ # Not allowed for the moment. 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 )
+ # Find the colorspace pointed to by the role
+ role_colorspaces = [colorspace
+ for colorspace in config_data['colorSpaces']
+ if colorspace.name == role_colorspace_prefixed_name]
+ role_colorspace = None
+ if len(role_colorspaces) > 0:
+ role_colorspace = role_colorspaces[0]
+ else:
+ if reference_data.name == role_colorspace_prefixed_name:
+ role_colorspace = reference_data