[Bf-blender-cvs] [8bd48895561] soc-2021-curves: Changed curve pen add to curve pen

dilithjay noreply at git.blender.org
Sat Dec 4 17:40:39 CET 2021


Commit: 8bd488955615204ea08f6a11476399d47619cca9
Author: dilithjay
Date:   Sun Nov 7 10:58:41 2021 +0530
Branches: soc-2021-curves
https://developer.blender.org/rB8bd488955615204ea08f6a11476399d47619cca9

Changed curve pen add to curve pen

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

M	release/scripts/presets/keyconfig/keymap_data/blender_default.py
M	source/blender/editors/curve/curve_intern.h
M	source/blender/editors/curve/curve_ops.c
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 0ae9bd1c6ee..3e0f305f415 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -6997,7 +6997,7 @@ 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_add", {"type": params.tool_mouse, "value": 'PRESS'},
+            ("curve.pen", {"type": params.tool_mouse, "value": 'PRESS'},
              {"properties": []}),
             ("curve.pen_delete", {"type": params.tool_mouse, "value": 'PRESS', "ctrl": True},
              {"properties": []}),
diff --git a/source/blender/editors/curve/curve_intern.h b/source/blender/editors/curve/curve_intern.h
index 22ddfff6696..8a81d12ec08 100644
--- a/source/blender/editors/curve/curve_intern.h
+++ b/source/blender/editors/curve/curve_intern.h
@@ -209,7 +209,7 @@ void ED_curve_nurb_vert_selected_find(
 void CURVE_OT_draw(struct wmOperatorType *ot);
 
 /* editcurve_pen.c */
-void CURVE_OT_pen_add(struct wmOperatorType *ot);
+void CURVE_OT_pen(struct wmOperatorType *ot);
 void CURVE_OT_pen_delete(struct wmOperatorType *ot);
 void CURVE_OT_pen_insert(struct wmOperatorType *ot);
 struct wmKeyMap *curve_pen_modal_keymap(struct wmKeyConfig *keyconf);
diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c
index 9a285d5f05f..d2f9115951d 100644
--- a/source/blender/editors/curve/curve_ops.c
+++ b/source/blender/editors/curve/curve_ops.c
@@ -127,7 +127,7 @@ void ED_operatortypes_curve(void)
   WM_operatortype_append(CURVE_OT_spin);
   WM_operatortype_append(CURVE_OT_vertex_add);
   WM_operatortype_append(CURVE_OT_draw);
-  WM_operatortype_append(CURVE_OT_pen_add);
+  WM_operatortype_append(CURVE_OT_pen);
   WM_operatortype_append(CURVE_OT_pen_delete);
   WM_operatortype_append(CURVE_OT_pen_insert);
   WM_operatortype_append(CURVE_OT_extrude);
diff --git a/source/blender/editors/curve/editcurve_pen.c b/source/blender/editors/curve/editcurve_pen.c
index 86a03c88540..be4a382b376 100644
--- a/source/blender/editors/curve/editcurve_pen.c
+++ b/source/blender/editors/curve/editcurve_pen.c
@@ -853,12 +853,12 @@ 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_add");
+  WM_modalkeymap_assign(keymap, "CURVE_OT_pen");
 
   return keymap;
 }
 
-static int curve_pen_add_modal(bContext *C, wmOperator *op, const wmEvent *event)
+static int curve_pen_modal(bContext *C, wmOperator *op, const wmEvent *event)
 {
   Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
   ViewContext vc;
@@ -1087,9 +1087,9 @@ static int curve_pen_insert_modal(bContext *C, wmOperator *op, const wmEvent *ev
   return ret;
 }
 
-static int curve_pen_add_invoke(bContext *C, wmOperator *op, const wmEvent *event)
+static int curve_pen_invoke(bContext *C, wmOperator *op, const wmEvent *event)
 {
-  int ret = curve_pen_add_modal(C, op, event);
+  int ret = curve_pen_modal(C, op, event);
   BLI_assert(ret == OPERATOR_RUNNING_MODAL);
   if (ret == OPERATOR_RUNNING_MODAL) {
     WM_event_add_modal_handler(C, op);
@@ -1120,16 +1120,16 @@ static int curve_pen_insert_invoke(bContext *C, wmOperator *op, const wmEvent *e
   return ret;
 }
 
-void CURVE_OT_pen_add(wmOperatorType *ot)
+void CURVE_OT_pen(wmOperatorType *ot)
 {
   /* identifiers */
-  ot->name = "Curve Pen Add";
-  ot->idname = "CURVE_OT_pen_add";
+  ot->name = "Curve Pen";
+  ot->idname = "CURVE_OT_pen";
   ot->description = "Construct and edit splines";
 
   /* api callbacks */
-  ot->invoke = curve_pen_add_invoke;
-  ot->modal = curve_pen_add_modal;
+  ot->invoke = curve_pen_invoke;
+  ot->modal = curve_pen_modal;
   ot->poll = ED_operator_view3d_active;
 
   /* flags */



More information about the Bf-blender-cvs mailing list