Commit: 9d99c9f379e137162ff80c81971a0380856f38e0
Author: Antonio Vazquez
Date:   Wed Aug 9 17:03:20 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB9d99c9f379e137162ff80c81971a0380856f38e0

Include Eraser radius on UI and add keymap

The eraser radius must be available on Paint mode

===================================================================

M       release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M       source/blender/editors/gpencil/gpencil_ops.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py 
b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index ee440c347b3..37f25b337e8 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -386,6 +386,9 @@ class GreasePencilBrushPanel:
             row = layout.row(align=False)
             row.prop(context.tool_settings, "use_gpencil_draw_onback", 
text="Draw on Back")
 
+            row = layout.row(align=False)
+            row.prop(context.user_preferences.edit, 
"grease_pencil_eraser_radius", text="Eraser")
+
 
 class GreasePencilStrokeSculptPanel:
     # subclass must set
diff --git a/source/blender/editors/gpencil/gpencil_ops.c 
b/source/blender/editors/gpencil/gpencil_ops.c
index ba283eabd8b..756ac67ee9c 100644
--- a/source/blender/editors/gpencil/gpencil_ops.c
+++ b/source/blender/editors/gpencil/gpencil_ops.c
@@ -287,10 +287,6 @@ static void ed_keymap_gpencil_editing(wmKeyConfig *keyconf)
         *       that the only data being edited is that of the Grease Pencil 
strokes
         */
        
-       /* CTRL + FKEY = Eraser Radius */
-       kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, 
KM_PRESS, KM_CTRL, 0);
-       RNA_string_set(kmi->ptr, "data_path_primary", 
"user_preferences.edit.grease_pencil_eraser_radius");
-       
        /* Interpolation */
        WM_keymap_add_item(keymap, "GPENCIL_OT_interpolate", EKEY, KM_PRESS, 
KM_CTRL | KM_ALT, 0);
        WM_keymap_add_item(keymap, "GPENCIL_OT_interpolate_sequence", EKEY, 
KM_PRESS, KM_SHIFT | KM_CTRL, 0);
@@ -466,6 +462,10 @@ static void ed_keymap_gpencil_painting(wmKeyConfig 
*keyconf)
        kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, 
KM_PRESS, 0, 0);
        RNA_string_set(kmi->ptr, "data_path_primary", 
"tool_settings.gpencil_brushes.active.line_width");
 
+       /* CTRL + FKEY = Eraser Radius */
+       kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, 
KM_PRESS, KM_CTRL, 0);
+       RNA_string_set(kmi->ptr, "data_path_primary", 
"user_preferences.edit.grease_pencil_eraser_radius");
+
        /* Enter EditMode */
        kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_editmode_toggle", TABKEY, 
KM_PRESS, KM_SHIFT, 0);
        RNA_int_set(kmi->ptr, "back", 1);

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to