Color management: When look is applied, we can not consider spaces to match
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 18 Sep 2017 13:09:53 +0000 (18:09 +0500)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 18 Sep 2017 13:09:53 +0000 (18:09 +0500)
This should fix T52812 after merge to blender2.8.

source/blender/imbuf/intern/colormanagement.c

index f510ded6b6015224d89dfe1ea7075121236d17b2..863bce125c5064c3bbe5d78702387538f63e03f5 100644 (file)
@@ -1522,6 +1522,10 @@ static bool is_ibuf_rect_in_display_space(ImBuf *ibuf, const ColorManagedViewSet
        {
                const char *from_colorspace = ibuf->rect_colorspace->name;
                const char *to_colorspace = IMB_colormanagement_get_display_colorspace_name(view_settings, display_settings);
+               ColorManagedLook *look_descr = colormanage_look_get_named(view_settings->look);
+               if (look_descr != NULL && !STREQ(look_descr->process_space, "")) {
+                       return false;
+               }
 
                if (to_colorspace && STREQ(from_colorspace, to_colorspace))
                        return true;