Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/mesh/editmesh_select.c
| Show First 20 Lines • Show All 992 Lines • ▼ Show 20 Lines | |||||
| eed = edarray[edindex]; | eed = edarray[edindex]; | ||||
| walker_select(em, BMW_EDGERING, eed, true); | walker_select(em, BMW_EDGERING, eed, true); | ||||
| } | } | ||||
| EDBM_selectmode_flush(em); | EDBM_selectmode_flush(em); | ||||
| } | } | ||||
| else { | else { | ||||
| for (edindex = 0; edindex < totedgesel; edindex += 1) { | for (edindex = 0; edindex < totedgesel; edindex += 1) { | ||||
| eed = edarray[edindex]; | eed = edarray[edindex]; | ||||
| walker_select(em, BMW_EDGELOOP, eed, true); | bool non_manifold = BM_edge_face_count_is_over(eed, 2); | ||||
| if (non_manifold) { | |||||
| walker_select(em, BMW_EDGELOOP_NONMANIFOLD, eed, true); | |||||
| } | |||||
| else { | |||||
| walker_select(em, BMW_EDGELOOP, eed, true); | |||||
| } | |||||
| } | } | ||||
| EDBM_selectmode_flush(em); | EDBM_selectmode_flush(em); | ||||
| } | } | ||||
| MEM_freeN(edarray); | MEM_freeN(edarray); | ||||
| // if (EM_texFaceCheck()) | // if (EM_texFaceCheck()) | ||||
| DEG_id_tag_update(obedit->data, ID_RECALC_SELECT); | DEG_id_tag_update(obedit->data, ID_RECALC_SELECT); | ||||
| WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); | WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); | ||||
| ▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
| walker_select(em, BMW_EDGERING, eed, select); | walker_select(em, BMW_EDGERING, eed, select); | ||||
| } | } | ||||
| static void mouse_mesh_loop_edge( | static void mouse_mesh_loop_edge( | ||||
| BMEditMesh *em, BMEdge *eed, bool select, bool select_clear, bool select_cycle) | BMEditMesh *em, BMEdge *eed, bool select, bool select_clear, bool select_cycle) | ||||
| { | { | ||||
| bool edge_boundary = false; | bool edge_boundary = false; | ||||
| bool non_manifold = BM_edge_face_count_is_over(eed , 2); | |||||
| /* Cycle between BMW_EDGELOOP / BMW_EDGEBOUNDARY. */ | /* Cycle between BMW_EDGELOOP / BMW_EDGEBOUNDARY. */ | ||||
| if (select_cycle && BM_edge_is_boundary(eed)) { | if (select_cycle && BM_edge_is_boundary(eed)) { | ||||
| int count_by_select[2]; | int count_by_select[2]; | ||||
| /* If the loops selected toggle the boundaries. */ | /* If the loops selected toggle the boundaries. */ | ||||
| walker_select_count(em, BMW_EDGELOOP, eed, count_by_select); | walker_select_count(em, BMW_EDGELOOP, eed, count_by_select); | ||||
| if (count_by_select[!select] == 0) { | if (count_by_select[!select] == 0) { | ||||
| Show All 9 Lines | |||||
| if (select_clear) { | if (select_clear) { | ||||
| EDBM_flag_disable_all(em, BM_ELEM_SELECT); | EDBM_flag_disable_all(em, BM_ELEM_SELECT); | ||||
| } | } | ||||
| if (edge_boundary) { | if (edge_boundary) { | ||||
| walker_select(em, BMW_EDGEBOUNDARY, eed, select); | walker_select(em, BMW_EDGEBOUNDARY, eed, select); | ||||
| } | } | ||||
| else if (non_manifold) { | |||||
| walker_select(em, BMW_EDGELOOP_NONMANIFOLD, eed, select); | |||||
| } | |||||
| else { | else { | ||||
| walker_select(em, BMW_EDGELOOP, eed, select); | walker_select(em, BMW_EDGELOOP, eed, select); | ||||
| } | } | ||||
| } | } | ||||
| static bool mouse_mesh_loop( | static bool mouse_mesh_loop( | ||||
| bContext *C, const int mval[2], bool extend, bool deselect, bool toggle, bool ring) | bContext *C, const int mval[2], bool extend, bool deselect, bool toggle, bool ring) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 992 Lines • Show Last 20 Lines | |||||