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
This commit is contained in:
Philipp Oeser 2020-10-13 15:33:03 +02:00
parent ec9edd36ca
commit 5f49f818d6
Notes: blender-bot 2023-02-13 20:52:11 +01:00
Referenced by issue #81670, Paint brush (sculpt mode) has no ctrl-switch
1 changed files with 3 additions and 1 deletions

View File

@ -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)