Commit: 3d68c92f0ac18a96b2125ad9de95008c21bc00c7
Author: Joshua Leung
Date:   Tue Sep 29 13:06:03 2015 +1300
Branches: GPencil_Editing_Stage3
https://developer.blender.org/rB3d68c92f0ac18a96b2125ad9de95008c21bc00c7

GP Sculpt: Tweak the keymaps again

* Added Ctrl-E-LMB and Shift-E-LMB to make it easier to start sculpt strokes
  to make it easier to use "invert" (and soon "smooth") with these brushes.

* Removed the Ctrl-E = Modal Sculpt keymapping, to avoid conflicts with the
  new additions. D+E+Sculpt still works though

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

M       source/blender/editors/gpencil/gpencil_brush.c
M       source/blender/editors/gpencil/gpencil_ops.c

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

diff --git a/source/blender/editors/gpencil/gpencil_brush.c 
b/source/blender/editors/gpencil/gpencil_brush.c
index afd1f61..4aa7ccd 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -1426,6 +1426,8 @@ static int gpsculpt_brush_modal(bContext *C, wmOperator 
*op, const wmEvent *even
 
 void GPENCIL_OT_brush_paint(wmOperatorType *ot)
 {
+       PropertyRNA *prop;
+       
        /* identifiers */
        ot->name = "Stroke Sculpt";
        ot->idname = "GPENCIL_OT_brush_paint";
@@ -1444,8 +1446,9 @@ void GPENCIL_OT_brush_paint(wmOperatorType *ot)
        /* properties */
        RNA_def_collection_runtime(ot->srna, "stroke", 
&RNA_OperatorStrokeElement, "Stroke", "");
        
-       RNA_def_boolean(ot->srna, "wait_for_input", true, "Wait for Input",
-                       "Enter a mini 'sculpt-mode' if enabled, otherwise, exit 
after drawing a single stroke");
+       prop = RNA_def_boolean(ot->srna, "wait_for_input", true, "Wait for 
Input",
+                              "Enter a mini 'sculpt-mode' if enabled, 
otherwise, exit after drawing a single stroke");
+       RNA_def_property_flag(prop, PROP_SKIP_SAVE);
 }
 
 /* ************************************************ */
diff --git a/source/blender/editors/gpencil/gpencil_ops.c 
b/source/blender/editors/gpencil/gpencil_ops.c
index 4fd155c..e925523 100644
--- a/source/blender/editors/gpencil/gpencil_ops.c
+++ b/source/blender/editors/gpencil/gpencil_ops.c
@@ -213,13 +213,24 @@ static void ed_keymap_gpencil_editing(wmKeyConfig 
*keyconf)
        RNA_boolean_set(kmi->ptr, "unselected", true);
        
        
-       /* Brush-Based Editing */
-       /* 1) EKEY + LMB = Single stroke, draw immediately */
+       /* Brush-Based Editing:
+        *   EKEY + LMB                          = Single stroke, draw 
immediately 
+        *        + Other Modifiers (Ctrl/Shift) = Invert, Smooth, etc.
+        *
+        * For the modal version, use D+E -> Sculpt
+        */
        kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_brush_paint", LEFTMOUSE, 
KM_PRESS, 0, EKEY);
        RNA_boolean_set(kmi->ptr, "wait_for_input", false);
-       /* 2) EKEY + CTRL = Enter sculpt mode */
-       kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_brush_paint", EKEY, 
KM_PRESS, KM_CTRL, 0);
-       RNA_boolean_set(kmi->ptr, "wait_for_input", true);
+       
+       kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_brush_paint", LEFTMOUSE, 
KM_PRESS, KM_CTRL, EKEY);
+       RNA_boolean_set(kmi->ptr, "wait_for_input", false);
+       /*RNA_boolean_set(kmi->ptr, "use_invert", true);*/
+       
+       kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_brush_paint", LEFTMOUSE, 
KM_PRESS, KM_SHIFT, EKEY);
+       RNA_boolean_set(kmi->ptr, "wait_for_input", false);
+       /*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);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to