Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2020-10-13 16:33:03 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2020-10-13 23:01:58 +0300
commit5f49f818d6282a2f421f454bb32b2a6b2c9a0a0d (patch)
tree07b4d0c7f5bc04d8127c24abc75c7f404a10dbd1 /source/blender/editors/sculpt_paint/sculpt_paint_color.c
parentec9edd36ca1f8f73373435a7941abff77df53719 (diff)
Fixes T81670: Sculpt paint vertex colors brush does not switch to secondary color using CTRL
This was just not implemented. Now make this consistent with vertexpainting / texturepainting. Maniphest Tasks: T81670 Differential Revision: https://developer.blender.org/D9195
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_paint_color.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_paint_color.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_paint_color.c b/source/blender/editors/sculpt_paint/sculpt_paint_color.c
index 000b7afdf55..f0047448a8d 100644
--- a/source/blender/editors/sculpt_paint/sculpt_paint_color.c
+++ b/source/blender/editors/sculpt_paint/sculpt_paint_color.c
@@ -133,7 +133,9 @@ static void do_paint_brush_task_cb_ex(void *__restrict userdata,
const int thread_id = BLI_task_parallel_thread_id(tls);
float brush_color[4] = {0.0f, 0.0f, 0.0f, 1.0f};
- copy_v3_v3(brush_color, BKE_brush_color_get(ss->scene, brush));
+ copy_v3_v3(brush_color,
+ ss->cache->invert ? BKE_brush_secondary_color_get(ss->scene, brush) :
+ 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)