From c08827e659e5f48034b4f9d4612bd309ea63ff03 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Thu, 12 Nov 2020 09:10:26 +0100 Subject: Fix T82093: Sampled Colors Mismatch When Painting (Partial) When painting in the image editor on data images (Non-color, Raw) the color mismatched between the sampled color and the actual effect that the painting has on the image. The root cause is that the sampling is color managed, but the painting still uses a fixed color management pipeline with a lot of assumptions. Due to recent changes the drawing of the image editor is color managed, but the painting isn't what made these changes show up. This patch is a work-a-round so that the sampled colors and the effect the paint has on the texture matches. This isn't the correct solution as that would be to migrate all the painting tools to use proper color management. Reviewed By: Pablo Dobarro Differential Revision: https://developer.blender.org/D9411 --- source/blender/editors/include/ED_image.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_image.h b/source/blender/editors/include/ED_image.h index 01040949a0a..4835d2118d9 100644 --- a/source/blender/editors/include/ED_image.h +++ b/source/blender/editors/include/ED_image.h @@ -58,7 +58,8 @@ void ED_space_image_set_mask(struct bContext *C, struct SpaceImage *sima, struct bool ED_space_image_color_sample(struct SpaceImage *sima, struct ARegion *region, int mval[2], - float r_col[3]); + float r_col[3], + bool *r_is_data); struct ImBuf *ED_space_image_acquire_buffer(struct SpaceImage *sima, void **r_lock, int tile); int ED_space_image_get_display_channel_mask(struct ImBuf *ibuf); void ED_space_image_release_buffer(struct SpaceImage *sima, struct ImBuf *ibuf, void *lock); -- cgit v1.2.3