diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-05-20 13:33:30 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-05-20 13:33:30 +0300 |
commit | f4d064a5b2a245fd12bf2c60a70e6049ff088e7d (patch) | |
tree | 8eac0be12684956b6ba6eb54de44b421d04e041e /source/blender/editors/space_image | |
parent | 28b2977be98c71ceaf9f36ddba406392b50a46c9 (diff) |
Send color managed signal if input spaces changes during image saving
We're currently only supporting save to a default format color space, which
makes it a bit tricky to prevent ImBuf from being changed.
For until when saving to a custom colorspace works we'll just reload image
if the space changes.
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index ddb1cec9180..d9f89bf627a 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1537,6 +1537,8 @@ static void save_image_post(wmOperator *op, ImBuf *ibuf, Image *ima, int ok, int { if (ok) { if (!save_copy) { + ColorManagedColorspaceSettings old_colorspace_settings; + if (do_newpath) { BLI_strncpy(ibuf->name, filepath, sizeof(ibuf->name)); BLI_strncpy(ima->name, filepath, sizeof(ima->name)); @@ -1570,8 +1572,14 @@ static void save_image_post(wmOperator *op, ImBuf *ibuf, Image *ima, int ok, int BLI_path_rel(ima->name, relbase); /* only after saving */ } + BKE_color_managed_colorspace_settings_copy(&old_colorspace_settings, + &ima->colorspace_settings); IMB_colormanagment_colorspace_from_ibuf_ftype(&ima->colorspace_settings, ibuf); - + if (!BKE_color_managed_colorspace_settings_equals(&old_colorspace_settings, + &ima->colorspace_settings)) + { + BKE_image_signal(ima, NULL, IMA_SIGNAL_COLORMANAGE); + } } } else { |