From 2cda8a9efbd15b1134c2594a15c2c42e9be71b59 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 1 May 2013 05:59:58 +0000 Subject: fix for select ungrouped vertices not flushing, also group select menu items more logically. --- release/scripts/startup/bl_ui/space_view3d.py | 21 ++++++++++++++++----- source/blender/editors/mesh/editmesh_select.c | 3 ++- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 036f701918d..c4507e2101e 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -582,26 +582,36 @@ class VIEW3D_MT_select_edit_mesh(Menu): layout.separator() + # primitive layout.operator("mesh.select_all").action = 'TOGGLE' layout.operator("mesh.select_all", text="Inverse").action = 'INVERT' layout.separator() - layout.operator("mesh.select_ungrouped", text="Ungrouped Verts") + # numeric layout.operator("mesh.select_random", text="Random") layout.operator("mesh.select_nth") + + layout.separator() + + # geometric layout.operator("mesh.edges_select_sharp", text="Sharp Edges") layout.operator("mesh.faces_select_linked_flat", text="Linked Flat Faces") - layout.operator("mesh.select_interior_faces", text="Interior Faces") - layout.operator("mesh.select_axis", text="Side of Active") layout.separator() - layout.operator("mesh.select_face_by_sides") + # topology + layout.operator("mesh.select_loose", text="Loose Geometry") if context.scene.tool_settings.mesh_select_mode[2] is False: layout.operator("mesh.select_non_manifold", text="Non Manifold") - layout.operator("mesh.select_loose", text="Loose Geometry") + layout.operator("mesh.select_interior_faces", text="Interior Faces") + layout.operator("mesh.select_face_by_sides") + + layout.separator() + + # other ... layout.operator_menu_enum("mesh.select_similar", "type", text="Similar") + layout.operator("mesh.select_ungrouped", text="Ungrouped Verts") layout.separator() @@ -611,6 +621,7 @@ class VIEW3D_MT_select_edit_mesh(Menu): layout.separator() layout.operator("mesh.select_mirror", text="Mirror") + layout.operator("mesh.select_axis", text="Side of Active") layout.operator("mesh.select_linked", text="Linked") layout.operator("mesh.select_vertex_path", text="Vertex Path") diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 2b836261fba..956d7cf1112 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -3331,12 +3331,13 @@ static int edbm_select_ungrouped_exec(bContext *C, wmOperator *op) if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) { MDeformVert *dv = CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT); /* no dv or dv set with no weight */ - if (dv == NULL || (dv && dv->dw == NULL)) { + if (ELEM(NULL, dv, dv->dw)) { BM_vert_select_set(em->bm, eve, true); } } } + EDBM_selectmode_flush(em); WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); return OPERATOR_FINISHED; -- cgit v1.2.3