Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2020-08-11 19:02:11 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2020-08-11 19:02:37 +0300
commit11509c14c38bdc818f60037921f3455ff626d61b (patch)
treecbd057861632e16b8eeed69d6956757448bfeeea /source/blender/editors/mesh
parent304f0f56c517373aaeb43f8e27c4ff4c26afb33b (diff)
Fix T75588: Missing loop cuts preview for edges without quads
The preview of points was only done when the edge is wire. Now the preview of points is done when the edge is not connected to any quad. Also to avoid edge slide in this case, all new vertices created in this specific case are not selected. Differential Revision: https://developer.blender.org/D7457
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh_loopcut.c6
-rw-r--r--source/blender/editors/mesh/editmesh_preselect_edgering.c6
2 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c
index 2f453369d92..b57e486634f 100644
--- a/source/blender/editors/mesh/editmesh_loopcut.c
+++ b/source/blender/editors/mesh/editmesh_loopcut.c
@@ -174,8 +174,10 @@ static void ringsel_finish(bContext *C, wmOperator *op)
if (lcd->do_cut) {
const bool is_macro = (op->opm != NULL);
/* a single edge (rare, but better support) */
- const bool is_single = (BM_edge_is_wire(lcd->eed));
- const int seltype = is_single ? SUBDIV_SELECT_INNER : SUBDIV_SELECT_LOOPCUT;
+ const bool is_edge_wire = BM_edge_is_wire(lcd->eed);
+ 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.
* Note though that it will break edgeslide in this specific case.
diff --git a/source/blender/editors/mesh/editmesh_preselect_edgering.c b/source/blender/editors/mesh/editmesh_preselect_edgering.c
index 50af79fc5e1..d9bd63ef35f 100644
--- a/source/blender/editors/mesh/editmesh_preselect_edgering.c
+++ b/source/blender/editors/mesh/editmesh_preselect_edgering.c
@@ -343,12 +343,12 @@ void EDBM_preselect_edgering_update_from_edge(struct EditMesh_PreSelEdgeRing *ps
BM_mesh_elem_index_ensure(bm, BM_VERT);
}
- if (BM_edge_is_wire(eed_start)) {
- view3d_preselect_mesh_edgering_update_verts_from_edge(
+ if (BM_edge_is_any_face_len_test(eed_start, 4)) {
+ view3d_preselect_mesh_edgering_update_edges_from_edge(
psel, bm, eed_start, previewlines, coords);
}
else {
- view3d_preselect_mesh_edgering_update_edges_from_edge(
+ view3d_preselect_mesh_edgering_update_verts_from_edge(
psel, bm, eed_start, previewlines, coords);
}
}