[Bf-blender-cvs] [7686a0a] GPencil_Editing_Stage3: GP Edit: Provide more direct quick access to sculpt brush via D+E pie

Joshua Leung noreply at git.blender.org
Sat Oct 17 17:09:03 CEST 2015


Commit: 7686a0ae9ca6d95b6bc5fdf6aad07aa3b88e249d
Author: Joshua Leung
Date:   Sun Oct 18 04:08:51 2015 +1300
Branches: GPencil_Editing_Stage3
https://developer.blender.org/rB7686a0ae9ca6d95b6bc5fdf6aad07aa3b88e249d

GP Edit: Provide more direct quick access to sculpt brush via D+E pie

Added direct buttons to quickly change the sculpt brush when bringing up the
D+E pie menu for GP Stroke Sculpting. These are only included for the most
useflu of the brushes. All others are currently still visible via the
dropdown on the left (of the pie), though I'm considering removing that
to make things less confusing.

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

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 c12e0c8..973fab5 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -360,11 +360,13 @@ class GPENCIL_PIE_sculpt(Menu):
         settings = context.tool_settings.gpencil_sculpt
         brush = settings.brush
 
+        # W - Launch Sculpt Mode
         col = pie.column()
         #col.label("Tool:")
         col.prop(settings, "tool", text="")
         col.operator("gpencil.brush_paint", text="Sculpt", icon='SCULPTMODE_HLT')
 
+        # E - Common Settings
         col = pie.column(align=True)
         col.prop(brush, "size", slider=True)
         row = col.row(align=True)
@@ -372,6 +374,18 @@ class GPENCIL_PIE_sculpt(Menu):
        # row.prop(brush, "use_pressure_strength", text="", icon_only=True)
         col.prop(brush, "use_falloff")
 
+        # S - Change Brush Type Shortcuts
+        row = pie.row()
+        row.prop_enum(settings, "tool", value='GRAB')
+        row.prop_enum(settings, "tool", value='PUSH')
+        row.prop_enum(settings, "tool", value='CLONE')
+
+        # N - Change Brush Type Shortcuts
+        row = pie.row()
+        row.prop_enum(settings, "tool", value='SMOOTH')
+        row.prop_enum(settings, "tool", value='THICKNESS')
+        row.prop_enum(settings, "tool", value='RANDOMISE')
+
 
 ###############################
 
diff --git a/source/blender/editors/gpencil/gpencil_ops.c b/source/blender/editors/gpencil/gpencil_ops.c
index fc12a07..933bcdf 100644
--- a/source/blender/editors/gpencil/gpencil_ops.c
+++ b/source/blender/editors/gpencil/gpencil_ops.c
@@ -215,6 +215,7 @@ static void ed_keymap_gpencil_editing(wmKeyConfig *keyconf)
 	/* Move to Layer */
 	WM_keymap_add_item(keymap, "GPENCIL_OT_move_to_layer", MKEY, KM_PRESS, 0, 0);
 	
+	
 	/* Brush-Based Editing:
 	 *   EKEY + LMB                          = Single stroke, draw immediately 
 	 *        + Other Modifiers (Ctrl/Shift) = Invert, Smooth, etc.
@@ -233,7 +234,6 @@ static void ed_keymap_gpencil_editing(wmKeyConfig *keyconf)
 	/*RNA_boolean_set(kmi->ptr, "use_smooth", true);*/
 	
 	
-	
 	/* Shift-FKEY = Sculpt Strength */
 	kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0);
 	RNA_string_set(kmi->ptr, "data_path_primary", "tool_settings.gpencil_sculpt.brush.strength");
@@ -243,6 +243,8 @@ static void ed_keymap_gpencil_editing(wmKeyConfig *keyconf)
 	RNA_string_set(kmi->ptr, "data_path_primary", "tool_settings.gpencil_sculpt.brush.size");
 	
 	
+	
+	
 	/* Transform Tools */
 	kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_translate", GKEY, KM_PRESS, 0, 0);
 	RNA_boolean_set(kmi->ptr, "gpencil_strokes", true);




More information about the Bf-blender-cvs mailing list