diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-12-28 21:08:30 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-12-28 21:08:43 +0300 |
commit | c79c48cc93b53f7fff35822b125915220ca78806 (patch) | |
tree | 8a82b0099197a16c56b1568277eab7010fe295fd /source/blender/bmesh | |
parent | 58ea1639da702c8e792d303703d129790f8510bc (diff) |
Fix T40930: Add a new option to select faces by smooth/flat shading.
Org code by robschia (Roberto Schiavone), first review by campbellbarton (Campbell Barton),
final review and minor changes by mont29 (Bastien Montagne).
Reviewers: cambellbarton, mont29
Subscribers: mont29, campbellbarton
Maniphest Tasks: T40930
Differential Revision: https://developer.blender.org/D638
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_operators.h | 1 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_similar.c | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_operators.h b/source/blender/bmesh/intern/bmesh_operators.h index 8557bcd91b7..f39fe29b596 100644 --- a/source/blender/bmesh/intern/bmesh_operators.h +++ b/source/blender/bmesh/intern/bmesh_operators.h @@ -82,6 +82,7 @@ enum { SIMFACE_PERIMETER, SIMFACE_NORMAL, SIMFACE_COPLANAR, + SIMFACE_SMOOTH, #ifdef WITH_FREESTYLE SIMFACE_FREESTYLE #endif diff --git a/source/blender/bmesh/operators/bmo_similar.c b/source/blender/bmesh/operators/bmo_similar.c index 4b5eebb2a73..1405d875979 100644 --- a/source/blender/bmesh/operators/bmo_similar.c +++ b/source/blender/bmesh/operators/bmo_similar.c @@ -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)) { |