diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-03-11 20:21:05 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-03-22 16:15:20 +0300 |
commit | 3b5224b57c3cfc39a7998ecfc482e13bd6940e68 (patch) | |
tree | 1111ceb0a6501b7de81d4e0e59b6d424c9773665 /source/blender/editors/space_image/image_ops.c | |
parent | 2ebcb7fab3e237b7d00de3088c34780cd24f397b (diff) |
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
Diffstat (limited to 'source/blender/editors/space_image/image_ops.c')
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 6 |
1 files changed, 1 insertions, 5 deletions
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); |