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>2018-10-06 15:56:49 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2018-10-06 16:11:24 +0300
commit7d5fb2e103e03046194d69640aadf7e76a700620 (patch)
tree34d4ee18defd325500f0af6bb3e8849c0a17890e /source/blender/editors/sculpt_paint/paint_ops.c
parent495a7128cb230a26bc72cb735e33be5324bf3baa (diff)
Vertex Paint: support switching to secondary color temporarily holding Ctrl
while it is possible to permanently flip the colors using the 'X' button, this makes it consistent with Texture Paint. fixes T56994 Reviewers: campbellbarton, brecht Reviewed By: brecht Subscribers: JulienKaspar Tags: #sculpting_and_painting Maniphest Tasks: T56994 Differential Revision: https://developer.blender.org/D3753
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_ops.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index 278d02a768c..0e51fb39d23 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -1388,7 +1388,8 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
keymap = WM_keymap_ensure(keyconf, "Vertex Paint", 0, 0);
keymap->poll = vertex_paint_mode_poll;
- WM_keymap_verify_item(keymap, "PAINT_OT_vertex_paint", LEFTMOUSE, KM_PRESS, 0, 0);
+ RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_vertex_paint", LEFTMOUSE, KM_PRESS, 0, 0)->ptr, "mode", BRUSH_STROKE_NORMAL);
+ RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_vertex_paint", LEFTMOUSE, KM_PRESS, KM_CTRL, 0)->ptr, "mode", BRUSH_STROKE_INVERT);
WM_keymap_add_item(keymap, "PAINT_OT_brush_colors_flip", XKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "PAINT_OT_sample_color", SKEY, KM_PRESS, 0, 0);