From 3b5224b57c3cfc39a7998ecfc482e13bd6940e68 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 11 Mar 2022 18:21:05 +0100 Subject: Cleanup: refactor passing of color management settings for image save Make a copy of ImageFormatData that contains the effective color management settings, and pass that along to the various functions. This will make it possible to add more complex logic later. For compositing nodes, passing along view and display settings through many functions made it harder to add additional settings, so just get those from the scene now. Differential Revision: https://developer.blender.org/D14401 --- source/blender/editors/space_image/image_ops.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'source/blender/editors/space_image') diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 1a7fb67954e..c4d69d589bf 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1812,11 +1812,7 @@ static int image_save_options_init(Main *bmain, } /* color management */ - BKE_color_managed_display_settings_copy(&opts->im_format.display_settings, - &scene->display_settings); - - BKE_color_managed_view_settings_free(&opts->im_format.view_settings); - BKE_color_managed_view_settings_copy(&opts->im_format.view_settings, &scene->view_settings); + BKE_image_format_color_management_copy_from_scene(&opts->im_format, scene); } BKE_image_release_ibuf(ima, ibuf, lock); -- cgit v1.2.3