[Bf-blender-cvs] [046d1a414be] master: Fix: Curves select all operator name

Hans Goudey noreply at git.blender.org
Fri Jan 13 17:50:56 CET 2023


Commit: 046d1a414be887bc9959ea9557427788b332674a
Author: Hans Goudey
Date:   Fri Jan 13 10:47:24 2023 -0600
Branches: master
https://developer.blender.org/rB046d1a414be887bc9959ea9557427788b332674a

Fix: Curves select all operator name

The operator is used for edit mode and sculpt mode, so it
shouldn't have the sculpt prefix.

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

M	release/scripts/presets/keyconfig/keymap_data/blender_default.py
M	release/scripts/startup/bl_ui/space_view3d.py
M	source/blender/editors/curves/intern/curves_ops.cc

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

diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index b02454cfa86..c861236c468 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -5636,7 +5636,7 @@ def km_sculpt_curves(params):
         ("curves.set_selection_domain", {"type": 'ONE', "value": 'PRESS'}, {"properties": [("domain", 'POINT')]}),
         ("curves.set_selection_domain", {"type": 'TWO', "value": 'PRESS'}, {"properties": [("domain", 'CURVE')]}),
         *_template_paint_radial_control("curves_sculpt"),
-        *_template_items_select_actions(params, "sculpt_curves.select_all"),
+        *_template_items_select_actions(params, "curves.select_all"),
         ("sculpt_curves.min_distance_edit", {"type": 'R', "value": 'PRESS', "shift": True}, {}),
         ("sculpt_curves.select_grow", {"type": 'A', "value": 'PRESS', "shift": True}, {}),
     ])
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index bb11ed80ac2..3bb009dd2ad 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -2053,9 +2053,9 @@ class VIEW3D_MT_select_sculpt_curves(Menu):
     def draw(self, _context):
         layout = self.layout
 
-        layout.operator("sculpt_curves.select_all", text="All").action = 'SELECT'
-        layout.operator("sculpt_curves.select_all", text="None").action = 'DESELECT'
-        layout.operator("sculpt_curves.select_all", text="Invert").action = 'INVERT'
+        layout.operator("curves.select_all", text="All").action = 'SELECT'
+        layout.operator("curves.select_all", text="None").action = 'DESELECT'
+        layout.operator("curves.select_all", text="Invert").action = 'INVERT'
         layout.operator("sculpt_curves.select_random", text="Random")
         layout.operator("sculpt_curves.select_end", text="Endpoints")
         layout.operator("sculpt_curves.select_grow", text="Grow")
diff --git a/source/blender/editors/curves/intern/curves_ops.cc b/source/blender/editors/curves/intern/curves_ops.cc
index 9a998b34f3c..1a9bd13a15b 100644
--- a/source/blender/editors/curves/intern/curves_ops.cc
+++ b/source/blender/editors/curves/intern/curves_ops.cc
@@ -923,10 +923,10 @@ static int select_all_exec(bContext *C, wmOperator *op)
 
 }  // namespace select_all
 
-static void SCULPT_CURVES_OT_select_all(wmOperatorType *ot)
+static void CURVES_OT_select_all(wmOperatorType *ot)
 {
   ot->name = "(De)select All";
-  ot->idname = __func__;
+  ot->idname = "CURVES_OT_select_all";
   ot->description = "(De)select all control points";
 
   ot->exec = select_all::select_all_exec;
@@ -1029,6 +1029,6 @@ void ED_operatortypes_curves()
   WM_operatortype_append(CURVES_OT_convert_from_particle_system);
   WM_operatortype_append(CURVES_OT_snap_curves_to_surface);
   WM_operatortype_append(CURVES_OT_set_selection_domain);
-  WM_operatortype_append(SCULPT_CURVES_OT_select_all);
+  WM_operatortype_append(CURVES_OT_select_all);
   WM_operatortype_append(CURVES_OT_surface_set);
 }



More information about the Bf-blender-cvs mailing list