[Bf-blender-cvs] [4a5a53bac9b] soc-2021-curves: Removed unused `Cancel` mode in Curve Pen

dilithjay noreply at git.blender.org
Sat Nov 6 08:45:15 CET 2021


Commit: 4a5a53bac9b9a8f555a3ab3563f87a5ff1a51199
Author: dilithjay
Date:   Sat Nov 6 13:15:00 2021 +0530
Branches: soc-2021-curves
https://developer.blender.org/rB4a5a53bac9b9a8f555a3ab3563f87a5ff1a51199

Removed unused `Cancel` mode in Curve Pen

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

M	release/scripts/presets/keyconfig/keymap_data/blender_default.py
M	source/blender/editors/curve/editcurve_pen.c

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

diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index 76c3fc9f4b3..b070c17419f 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -6084,8 +6084,6 @@ def km_curve_pen_modal_map(_params):
     )
 
     items.extend([
-        ("CANCEL", {"type": 'ESC', "value": 'PRESS', "any": True}, None),
-        ("CANCEL", {"type": 'RIGHTMOUSE', "value": 'PRESS', "any": True}, None),
         ("FREE_MOVE_HANDLE", {"type": 'LEFT_SHIFT', "value": 'PRESS', "any": True}, None),
     ])
 
@@ -6999,9 +6997,9 @@ def km_3d_view_tool_edit_curve_pen(params):
         "3D View Tool: Edit Curve, Curve Pen",
         {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
         {"items": [
-            ("curve.pen", {"type": params.tool_mouse, "value": 'PRESS'},
+            ("curve.pen_add", {"type": params.tool_mouse, "value": 'PRESS'},
              {"properties": [("wait_for_input", False), ("cut_or_delete", False)]}),
-            ("curve.pen", {"type": params.tool_mouse, "value": 'PRESS', "ctrl": True},
+            ("curve.pen_delete", {"type": params.tool_mouse, "value": 'PRESS', "ctrl": True},
              {"properties": [("cut_or_delete", True)]}),
         ]},
     )
diff --git a/source/blender/editors/curve/editcurve_pen.c b/source/blender/editors/curve/editcurve_pen.c
index 27475b14090..4f6b718f9e7 100644
--- a/source/blender/editors/curve/editcurve_pen.c
+++ b/source/blender/editors/curve/editcurve_pen.c
@@ -829,14 +829,12 @@ static bool make_cyclic_if_endpoints(
 }
 
 enum {
-  PEN_MODAL_CANCEL = 1,
-  PEN_MODAL_FREE_MOVE_HANDLE,
+  PEN_MODAL_FREE_MOVE_HANDLE=1,
 };
 
 wmKeyMap *curve_pen_modal_keymap(wmKeyConfig *keyconf)
 {
   static const EnumPropertyItem modal_items[] = {
-      {PEN_MODAL_CANCEL, "CANCEL", 0, "Cancel", "Cancel pen"},
       {PEN_MODAL_FREE_MOVE_HANDLE,
        "FREE_MOVE_HANDLE",
        0,
@@ -853,7 +851,7 @@ wmKeyMap *curve_pen_modal_keymap(wmKeyConfig *keyconf)
 
   keymap = WM_modalkeymap_ensure(keyconf, "Curve Pen Modal Map", modal_items);
 
-  WM_modalkeymap_assign(keymap, "CURVE_OT_pen");
+  WM_modalkeymap_assign(keymap, "CURVE_OT_pen_add");
 
   return keymap;
 }
@@ -1040,7 +1038,7 @@ void CURVE_OT_pen(wmOperatorType *ot)
 {
   /* identifiers */
   ot->name = "Curve Pen";
-  ot->idname = "CURVE_OT_pen";
+  ot->idname = "CURVE_OT_pen_add";
   ot->description = "Construct and edit splines";
 
   /* api callbacks */



More information about the Bf-blender-cvs mailing list