Commits

Anonymous committed a04e86e

fix: display weight brush strength widget only in weight paint mode

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@55857954f8c5b-7b00-dc11-b283-0030488c597c

  • Participants
  • Parent commits 1ad8ebd

Comments (0)

Files changed (1)

File blender/source/blender/editors/sculpt_paint/paint_ops.c

 }
 
 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,
 	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);
 
 	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);