UI: rename 'Remove Doubles' to 'Merge by Distance'
authorWilliam Reynish <billrey@me.com>
Thu, 2 May 2019 11:50:54 +0000 (21:50 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 2 May 2019 11:57:24 +0000 (21:57 +1000)
Also add into the "Merge" menu.

release/scripts/presets/keyconfig/keymap_data/blender_default.py
release/scripts/startup/bl_ui/space_view3d.py
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/uvedit/uvedit_ops.c

index 844e5d3..45c082f 100644 (file)
@@ -3935,7 +3935,7 @@ def km_mesh(params):
         ("mesh.rip_move", {"type": 'V', "value": 'PRESS', "alt": True},
          {"properties": [("MESH_OT_rip", [("use_fill", True), ],)]}),
         ("mesh.rip_edge_move", {"type": 'D', "value": 'PRESS', "alt": True}, None),
-        ("mesh.merge", {"type": 'M', "value": 'PRESS', "alt": True}, None),
+        op_menu("VIEW3D_MT_edit_mesh_merge", {"type": 'M', "value": 'PRESS', "alt": True}),
         ("transform.shrink_fatten", {"type": 'S', "value": 'PRESS', "alt": True}, None),
         ("mesh.edge_face_add", {"type": 'F', "value": 'PRESS'}, None),
         ("mesh.duplicate_move", {"type": 'D', "value": 'PRESS', "shift": True}, None),
index c6674bf..8c9a1f8 100644 (file)
@@ -3358,8 +3358,7 @@ class VIEW3D_MT_edit_mesh_context_menu(Menu):
 
             # Removal Operators
             if selected_verts_len > 1:
-                col.operator_menu_enum("mesh.merge", "type", text="Merge Vertices")
-                col.operator("mesh.remove_doubles", text="Remove Double Vertices")
+                col.menu("VIEW3D_MT_edit_mesh_merge", text="Merge Vertices")
             col.operator("mesh.dissolve_verts")
             col.operator("mesh.delete", text="Delete Vertices").type = 'VERT'
 
@@ -3562,8 +3561,7 @@ class VIEW3D_MT_edit_mesh_vertices(Menu):
 
         layout.separator()
 
-        layout.operator_menu_enum("mesh.merge", "type", text="Merge Vertices")
-        layout.operator("mesh.remove_doubles", text="Remove Double Vertices")
+        layout.menu("VIEW3D_MT_edit_mesh_merge", text="Merge Vertices")
 
         layout.separator()
 
@@ -3852,6 +3850,19 @@ class VIEW3D_MT_edit_mesh_delete(Menu):
         layout.operator("mesh.delete_edgeloop", text="Edge Loops")
 
 
+class VIEW3D_MT_edit_mesh_merge(Menu):
+    bl_label = "Merge"
+
+    def draw(self, _context):
+        layout = self.layout
+
+        layout.operator_enum("mesh.merge", "type")
+
+        layout.separator()
+
+        layout.operator("mesh.remove_doubles", text="By Distance")
+
+
 class VIEW3D_MT_edit_mesh_showhide(ShowHideMenu, Menu):
     _operator_name = "mesh"
 
@@ -6419,6 +6430,7 @@ classes = (
     VIEW3D_MT_edit_mesh_weights,
     VIEW3D_MT_edit_mesh_clean,
     VIEW3D_MT_edit_mesh_delete,
+    VIEW3D_MT_edit_mesh_merge,
     VIEW3D_MT_edit_mesh_showhide,
     VIEW3D_MT_paint_gpencil,
     VIEW3D_MT_assign_material,
index 7d9bb42..cd9d046 100644 (file)
@@ -3169,8 +3169,8 @@ static int edbm_remove_doubles_exec(bContext *C, wmOperator *op)
 void MESH_OT_remove_doubles(wmOperatorType *ot)
 {
   /* identifiers */
-  ot->name = "Remove Doubles";
-  ot->description = "Remove duplicate vertices";
+  ot->name = "Merge by Distance";
+  ot->description = "Merge vertices based on their proximity";
   ot->idname = "MESH_OT_remove_doubles";
 
   /* api callbacks */
index 7de609a..30ded60 100644 (file)
@@ -2203,7 +2203,7 @@ static int uv_remove_doubles_exec(bContext *C, wmOperator *op)
 static void UV_OT_remove_doubles(wmOperatorType *ot)
 {
   /* identifiers */
-  ot->name = "Remove Doubles UV";
+  ot->name = "Merge UVs by Distance";
   ot->description =
       "Selected UV vertices that are within a radius of each other are welded together";
   ot->idname = "UV_OT_remove_doubles";