diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-03-09 02:34:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-03-09 02:34:38 +0300 |
commit | d1bf196de1f4fb35921a383e15f2c87e3333f702 (patch) | |
tree | e2b94ea1dbb92d2d26548c193263c703e1444424 /source/blender/editors/sculpt_paint | |
parent | 754b22bd515790cd31b8e40f188b2e07196d76a8 (diff) |
improve brush size keys so they dont change by 20 each time (bad for small brushes), added wm.context_scale_int() operator.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_ops.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index f1aaa1b5400..16734f28cb2 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -184,15 +184,13 @@ static void ed_keymap_paint_brush_size(wmKeyMap *keymap, const char *path) { wmKeyMapItem *kmi; - kmi= WM_keymap_add_item(keymap, "WM_OT_context_set_int", LEFTBRACKETKEY, KM_PRESS, 0, 0); + kmi= WM_keymap_add_item(keymap, "WM_OT_context_scale_int", LEFTBRACKETKEY, KM_PRESS, 0, 0); RNA_string_set(kmi->ptr, "path", path); - RNA_int_set(kmi->ptr, "value", -20); - RNA_boolean_set(kmi->ptr, "relative", 1); + RNA_float_set(kmi->ptr, "value", 0.9); - kmi= WM_keymap_add_item(keymap, "WM_OT_context_set_int", RIGHTBRACKETKEY, KM_PRESS, 0, 0); + kmi= WM_keymap_add_item(keymap, "WM_OT_context_scale_int", RIGHTBRACKETKEY, KM_PRESS, 0, 0); RNA_string_set(kmi->ptr, "path", path); - RNA_int_set(kmi->ptr, "value", 20); - RNA_boolean_set(kmi->ptr, "relative", 1); + RNA_float_set(kmi->ptr, "value", 10.0/9.0); // 1.1111.... } void ED_keymap_paint(wmKeyConfig *keyconf) |