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:
authorCampbell Barton <ideasman42@gmail.com>2021-08-05 18:42:02 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-08-05 18:43:13 +0300
commitc15635bd8d5483a56107b5c31d8dc0b6a691a767 (patch)
tree5d33778294c45a7d714b2dd303ffcb80aec7012c /source/blender/editors/mesh/editmesh_tools.c
parent04c24bec07c1671b78d94bfd530230ec533fae8e (diff)
BMesh: support laplacian smooth for n-gons
Follow the same logic already used by the modifier.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_tools.c')
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 215ce0185f1..1b6643da1aa 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -2748,9 +2748,6 @@ void MESH_OT_vertices_smooth(wmOperatorType *ot)
static int edbm_do_smooth_laplacian_vertex_exec(bContext *C, wmOperator *op)
{
- BMIter fiter;
- BMFace *f;
- int tot_invalid = 0;
int tot_unselected = 0;
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -2777,22 +2774,6 @@ static int edbm_do_smooth_laplacian_vertex_exec(bContext *C, wmOperator *op)
if (em->bm->totvertsel == 0) {
tot_unselected++;
- tot_invalid++;
- continue;
- }
-
- bool is_invalid = false;
- /* Check if select faces are triangles. */
- BM_ITER_MESH (f, &fiter, em->bm, BM_FACES_OF_MESH) {
- if (BM_elem_flag_test(f, BM_ELEM_SELECT)) {
- if (f->len > 4) {
- tot_invalid++;
- is_invalid = true;
- break;
- }
- }
- }
- if (is_invalid) {
continue;
}
@@ -2841,10 +2822,6 @@ static int edbm_do_smooth_laplacian_vertex_exec(bContext *C, wmOperator *op)
BKE_report(op->reports, RPT_WARNING, "No selected vertex");
return OPERATOR_CANCELLED;
}
- if (tot_invalid == objects_len) {
- BKE_report(op->reports, RPT_WARNING, "Selected faces must be triangles or quads");
- return OPERATOR_CANCELLED;
- }
return OPERATOR_FINISHED;
}