Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/mesh/editmesh_loopcut.c
| Show First 20 Lines • Show All 168 Lines • ▼ Show 20 Lines | if (lcd->eed) { | ||||
| BMEditMesh *em = lcd->em; | BMEditMesh *em = lcd->em; | ||||
| BMVert *v_eed_orig[2] = {lcd->eed->v1, lcd->eed->v2}; | BMVert *v_eed_orig[2] = {lcd->eed->v1, lcd->eed->v2}; | ||||
| edgering_select(lcd); | edgering_select(lcd); | ||||
| if (lcd->do_cut) { | if (lcd->do_cut) { | ||||
| const bool is_macro = (op->opm != NULL); | const bool is_macro = (op->opm != NULL); | ||||
| /* a single edge (rare, but better support) */ | /* a single edge (rare, but better support) */ | ||||
| const bool is_single = (BM_edge_is_wire(lcd->eed)); | const bool is_edge_wire = BM_edge_is_wire(lcd->eed); | ||||
| const int seltype = is_single ? SUBDIV_SELECT_INNER : SUBDIV_SELECT_LOOPCUT; | const bool is_single = is_edge_wire || !BM_edge_is_any_face_len_test(lcd->eed, 4); | ||||
| const int seltype = is_edge_wire ? SUBDIV_SELECT_INNER : | |||||
| is_single ? SUBDIV_SELECT_NONE : SUBDIV_SELECT_LOOPCUT; | |||||
| /* Enable gridfill, so that intersecting loopcut works as one would expect. | /* Enable gridfill, so that intersecting loopcut works as one would expect. | ||||
| * Note though that it will break edgeslide in this specific case. | * Note though that it will break edgeslide in this specific case. | ||||
| * See [#31939]. */ | * See [#31939]. */ | ||||
| BM_mesh_esubdivide(em->bm, | BM_mesh_esubdivide(em->bm, | ||||
| BM_ELEM_SELECT, | BM_ELEM_SELECT, | ||||
| smoothness, | smoothness, | ||||
| smooth_falloff, | smooth_falloff, | ||||
| ▲ Show 20 Lines • Show All 566 Lines • Show Last 20 Lines | |||||