From db7d370657efa39a3bd69f057c8f405c17c41ac5 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Mon, 29 Jun 2020 18:44:13 +0200 Subject: Fix T78201: Paint color not matching the UI and color picker The color picker and brush->rgb values are in srgb, but sculpt vertex colors works in linear, so they need to be converted. Reviewed By: sergey Maniphest Tasks: T78201 Differential Revision: https://developer.blender.org/D8111 --- source/blender/editors/sculpt_paint/sculpt_paint_color.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/editors/sculpt_paint/sculpt_paint_color.c') diff --git a/source/blender/editors/sculpt_paint/sculpt_paint_color.c b/source/blender/editors/sculpt_paint/sculpt_paint_color.c index 191d18cb543..9b38def6b7b 100644 --- a/source/blender/editors/sculpt_paint/sculpt_paint_color.c +++ b/source/blender/editors/sculpt_paint/sculpt_paint_color.c @@ -44,6 +44,8 @@ #include "DEG_depsgraph.h" +#include "IMB_colormanagement.h" + #include "WM_api.h" #include "WM_message.h" #include "WM_toolsystem.h" @@ -132,6 +134,7 @@ static void do_paint_brush_task_cb_ex(void *__restrict userdata, float brush_color[4] = {0.0f, 0.0f, 0.0f, 1.0f}; copy_v3_v3(brush_color, BKE_brush_color_get(ss->scene, brush)); + IMB_colormanagement_srgb_to_scene_linear_v3(brush_color); BKE_pbvh_vertex_iter_begin(ss->pbvh, data->nodes[n], vd, PBVH_ITER_UNIQUE) { -- cgit v1.2.3