diff options
Diffstat (limited to 'source/blender/bmesh/operators/bmo_similar.c')
-rw-r--r-- | source/blender/bmesh/operators/bmo_similar.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/bmesh/operators/bmo_similar.c b/source/blender/bmesh/operators/bmo_similar.c index f779828a00d..5f8438919df 100644 --- a/source/blender/bmesh/operators/bmo_similar.c +++ b/source/blender/bmesh/operators/bmo_similar.c @@ -115,7 +115,7 @@ void bmo_similar_faces_exec(BMesh *bm, BMOperator *op) num_total = BM_mesh_elem_count(bm, BM_FACE); /* - * The first thing to do is to iterate through all the the selected items and mark them since + * The first thing to do is to iterate through all the selected items and mark them since * they will be in the selection anyway. * This will increase performance, (especially when the number of originally selected faces is high) * so the overall complexity will be less than $O(mn)$ where is the total number of selected faces, @@ -245,6 +245,13 @@ void bmo_similar_faces_exec(BMesh *bm, BMOperator *op) cont = false; } break; + + case SIMFACE_SMOOTH: + if (BM_elem_flag_test(fm, BM_ELEM_SMOOTH) == BM_elem_flag_test(fs, BM_ELEM_SMOOTH)) { + BMO_elem_flag_enable(bm, fm, FACE_MARK); + cont = false; + } + break; #ifdef WITH_FREESTYLE case SIMFACE_FREESTYLE: if (CustomData_has_layer(&bm->pdata, CD_FREESTYLE_FACE)) { @@ -405,10 +412,10 @@ void bmo_similar_edges_exec(BMesh *bm, BMOperator *op) /* compute the angle between the two edges */ angle = angle_normalized_v3v3(e_ext[i].dir, e_ext[indices[idx]].dir); - if (angle > (float)(M_PI / 2.0)) /* use the smallest angle between the edges */ + if (angle > (float)M_PI_2) /* use the smallest angle between the edges */ angle = fabsf(angle - (float)M_PI); - if (angle / (float)(M_PI / 2.0) <= thresh) { + if (angle / (float)M_PI_2 <= thresh) { BMO_elem_flag_enable(bm, e, EDGE_MARK); cont = false; } |