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:
authorGaia Clary <gaia.clary@machinimatrix.org>2013-04-07 02:29:47 +0400
committerGaia Clary <gaia.clary@machinimatrix.org>2013-04-07 02:29:47 +0400
commitce12370b79d670278bcfa0e135e0e4a8c343cd2b (patch)
tree1421b1fa269314026c999778fce3bb9c4f69eb84 /source/blender
parent95080ea5cd6a039b668aac93787357be484aaf57 (diff)
fix: display weight brush strength widget only in weight paint mode
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index f480725277e..d8f3f2827c5 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -767,9 +767,10 @@ static void ed_keymap_paint_brush_size(wmKeyMap *keymap, const char *UNUSED(path
}
typedef enum {
- RC_COLOR = 1,
+ RC_COLOR = 1,
RC_ROTATION = 2,
- RC_ZOOM = 4
+ RC_ZOOM = 4,
+ RC_WEIGHT = 8
} RCFlags;
static void set_brush_rc_path(PointerRNA *ptr, const char *brush_path,
@@ -829,8 +830,10 @@ static void ed_keymap_paint_brush_radial_control(wmKeyMap *keymap, const char *p
kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0);
set_brush_rc_props(kmi->ptr, paint, "strength", "use_unified_strength", flags_nozoom);
- kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", WKEY, KM_PRESS, 0, 0);
- set_brush_rc_props(kmi->ptr, paint, "weight", "use_unified_weight", flags_nozoom);
+ if (flags & RC_WEIGHT) {
+ kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", WKEY, KM_PRESS, 0, 0);
+ set_brush_rc_props(kmi->ptr, paint, "weight", "use_unified_weight", flags_nozoom);
+ }
if (flags & RC_ROTATION) {
kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, KM_PRESS, KM_CTRL, 0);
@@ -979,7 +982,7 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
ed_keymap_paint_brush_switch(keymap, "weight_paint");
ed_keymap_paint_brush_size(keymap, "tool_settings.weight_paint.brush.size");
- ed_keymap_paint_brush_radial_control(keymap, "weight_paint", 0);
+ ed_keymap_paint_brush_radial_control(keymap, "weight_paint", RC_WEIGHT);
ed_keymap_stencil(keymap);