Color management: Cleanup, make function name more clear
The idea is to reflect that the view settings are the best for cases when one wants to see things as if they are a render result.
This commit is contained in:
@@ -101,9 +101,12 @@ void BKE_color_managed_display_settings_copy(
|
||||
struct ColorManagedDisplaySettings *new_settings,
|
||||
const struct ColorManagedDisplaySettings *settings);
|
||||
|
||||
void BKE_color_managed_view_settings_init(
|
||||
/* Initialize view settings to be best suitable for render type of viewing.
|
||||
* This will use default view transform from the OCIO configuration. */
|
||||
void BKE_color_managed_view_settings_init_render(
|
||||
struct ColorManagedViewSettings *settings,
|
||||
const struct ColorManagedDisplaySettings *display_settings);
|
||||
|
||||
void BKE_color_managed_view_settings_copy(
|
||||
struct ColorManagedViewSettings *new_settings,
|
||||
const struct ColorManagedViewSettings *settings);
|
||||
|
||||
@@ -1569,7 +1569,7 @@ void BKE_color_managed_display_settings_copy(ColorManagedDisplaySettings *new_se
|
||||
BLI_strncpy(new_settings->display_device, settings->display_device, sizeof(new_settings->display_device));
|
||||
}
|
||||
|
||||
void BKE_color_managed_view_settings_init(
|
||||
void BKE_color_managed_view_settings_init_render(
|
||||
ColorManagedViewSettings *view_settings,
|
||||
const ColorManagedDisplaySettings *display_settings)
|
||||
{
|
||||
|
||||
@@ -1402,8 +1402,8 @@ void BKE_imformat_defaults(ImageFormatData *im_format)
|
||||
im_format->compress = 15;
|
||||
|
||||
BKE_color_managed_display_settings_init(&im_format->display_settings);
|
||||
BKE_color_managed_view_settings_init(&im_format->view_settings,
|
||||
&im_format->display_settings);
|
||||
BKE_color_managed_view_settings_init_render(&im_format->view_settings,
|
||||
&im_format->display_settings);
|
||||
}
|
||||
|
||||
void BKE_imbuf_to_image_format(struct ImageFormatData *im_format, const ImBuf *imbuf)
|
||||
|
||||
@@ -763,8 +763,8 @@ void BKE_scene_init(Scene *sce)
|
||||
colorspace_name = IMB_colormanagement_role_colorspace_name_get(COLOR_ROLE_DEFAULT_SEQUENCER);
|
||||
|
||||
BKE_color_managed_display_settings_init(&sce->display_settings);
|
||||
BKE_color_managed_view_settings_init(&sce->view_settings,
|
||||
&sce->display_settings);
|
||||
BKE_color_managed_view_settings_init_render(&sce->view_settings,
|
||||
&sce->display_settings);
|
||||
BLI_strncpy(sce->sequencer_colorspace_settings.name, colorspace_name,
|
||||
sizeof(sce->sequencer_colorspace_settings.name));
|
||||
|
||||
|
||||
@@ -930,8 +930,8 @@ static OCIO_ConstProcessorRcPtr *display_to_scene_linear_processor(ColorManagedD
|
||||
return (OCIO_ConstProcessorRcPtr *) display->to_scene_linear;
|
||||
}
|
||||
|
||||
static void init_default_view_settings(const ColorManagedDisplaySettings *display_settings,
|
||||
ColorManagedViewSettings *view_settings)
|
||||
static void init_render_view_settings(const ColorManagedDisplaySettings *display_settings,
|
||||
ColorManagedViewSettings *view_settings)
|
||||
{
|
||||
ColorManagedDisplay *display;
|
||||
ColorManagedView *default_view = NULL;
|
||||
@@ -2142,7 +2142,7 @@ unsigned char *IMB_display_buffer_acquire(ImBuf *ibuf, const ColorManagedViewSet
|
||||
* this happens for images which don't want to be displayed with render settings
|
||||
*/
|
||||
|
||||
init_default_view_settings(display_settings, &default_view_settings);
|
||||
init_render_view_settings(display_settings, &default_view_settings);
|
||||
applied_view_settings = &default_view_settings;
|
||||
}
|
||||
|
||||
@@ -3144,7 +3144,7 @@ ColormanageProcessor *IMB_colormanagement_display_processor_new(const ColorManag
|
||||
applied_view_settings = view_settings;
|
||||
}
|
||||
else {
|
||||
init_default_view_settings(display_settings, &default_view_settings);
|
||||
init_render_view_settings(display_settings, &default_view_settings);
|
||||
applied_view_settings = &default_view_settings;
|
||||
}
|
||||
|
||||
@@ -3445,7 +3445,7 @@ bool IMB_colormanagement_setup_glsl_draw_from_space(const ColorManagedViewSettin
|
||||
* this happens for images which don't want to be displayed with render settings
|
||||
*/
|
||||
|
||||
init_default_view_settings(display_settings, &default_view_settings);
|
||||
init_render_view_settings(display_settings, &default_view_settings);
|
||||
applied_view_settings = &default_view_settings;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user