diff options
author | Habib Gahbiche <habibgahbiche@gmail.com> | 2018-11-09 22:03:41 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-11-09 22:19:04 +0300 |
commit | 0c1934f3c2d3dff3bce65e2e8169866bafea04e0 (patch) | |
tree | 4b5e8baf24fe1946bcf6eb1ce76286025e8eb67d /source/blender/editors/mesh/editmesh_select_similar.c | |
parent | dc346c05fe32c7d90be261a2e970ef976b13c1fc (diff) |
Multi-Objects: MESH_OT_select_similar worldspace completion
This makes the operator to work 100% with worldspace similarity:
* SIMFACE_PERIMETER
* SIMFACE_AREA
* SIMEDGE_FACE_ANGLE
Note from revisor (Dalai Felinto):
I'm not sure we want to pass Object * to the bmesh api, though I
personally don't see why not. Either way I group the patches together so
we can more easily roll them back if needs be.
Maniphest Tasks: T56948
Differential Revision: D3908, D3899, D3896
Diffstat (limited to 'source/blender/editors/mesh/editmesh_select_similar.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_select_similar.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/mesh/editmesh_select_similar.c b/source/blender/editors/mesh/editmesh_select_similar.c index d33802dca05..85b59cb78c3 100644 --- a/source/blender/editors/mesh/editmesh_select_similar.c +++ b/source/blender/editors/mesh/editmesh_select_similar.c @@ -293,14 +293,14 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) } case SIMFACE_AREA: { - float area = BM_face_calc_area(face); + float area = BM_face_calc_area_worldspace(ob, face); float dummy[3] = {area, 0.0f, 0.0f}; BLI_kdtree_insert(tree, tree_index++, dummy); break; } case SIMFACE_PERIMETER: { - float perimeter = BM_face_calc_perimeter(face); + float perimeter = BM_face_calc_perimeter_worldspace(ob, face); float dummy[3] = {perimeter, 0.0f, 0.0f}; BLI_kdtree_insert(tree, tree_index++, dummy); break; @@ -440,7 +440,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) } case SIMFACE_AREA: { - float area = BM_face_calc_area(face); + float area = BM_face_calc_area_worldspace(ob, face); if (ED_select_similar_compare_float_tree(tree, area, thresh, compare)) { select = true; } @@ -448,7 +448,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) } case SIMFACE_PERIMETER: { - float perimeter = BM_face_calc_perimeter(face); + float perimeter = BM_face_calc_perimeter_worldspace(ob, face); if (ED_select_similar_compare_float_tree(tree, perimeter, thresh, compare)) { select = true; } @@ -774,7 +774,7 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op) case SIMEDGE_FACE_ANGLE: { if (BM_edge_face_count_at_most(edge, 2) == 2) { - float angle = BM_edge_calc_face_angle(edge); + float angle = BM_edge_calc_face_angle_worldspace(ob, edge); float dummy[3] = {angle, 0.0f, 0.0f}; BLI_kdtree_insert(tree, tree_index++, dummy); } @@ -904,7 +904,7 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op) case SIMEDGE_FACE_ANGLE: { if (BM_edge_face_count_at_most(edge, 2) == 2) { - float angle = BM_edge_calc_face_angle(edge); + float angle = BM_edge_calc_face_angle_worldspace(ob, edge); if (ED_select_similar_compare_float_tree(tree, angle, thresh, SIM_CMP_EQ)) { select = true; } |