[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55857] trunk/blender/source/blender/ editors/sculpt_paint/paint_ops.c: fix: display weight brush strength widget only in weight paint mode
Gaia Clary
gaia.clary at machinimatrix.org
Sun Apr 7 00:29:48 CEST 2013
Revision: 55857
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55857
Author: gaiaclary
Date: 2013-04-06 22:29:47 +0000 (Sat, 06 Apr 2013)
Log Message:
-----------
fix: display weight brush strength widget only in weight paint mode
Modified Paths:
--------------
trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c
Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c 2013-04-06 22:21:42 UTC (rev 55856)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c 2013-04-06 22:29:47 UTC (rev 55857)
@@ -767,9 +767,10 @@
}
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 @@
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 @@
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);
More information about the Bf-blender-cvs
mailing list