diff options
Diffstat (limited to 'source/blender/bmesh/intern')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_query.c | 16 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_query.h | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_query.c b/source/blender/bmesh/intern/bmesh_query.c index e3b6e243906..64950411fed 100644 --- a/source/blender/bmesh/intern/bmesh_query.c +++ b/source/blender/bmesh/intern/bmesh_query.c @@ -2431,6 +2431,22 @@ bool BM_edge_is_all_face_flag_test(const BMEdge *e, const char hflag, const bool return true; } +bool BM_edge_is_any_face_flag_test(const BMEdge *e, const char hflag) +{ + if (e->l) { + BMLoop *l_iter, *l_first; + + l_iter = l_first = e->l; + do { + if (BM_elem_flag_test(l_iter->f, hflag)) { + return true; + } + } while ((l_iter = l_iter->radial_next) != l_first); + } + + return false; +} + /* convenience functions for checking flags */ bool BM_edge_is_any_vert_flag_test(const BMEdge *e, const char hflag) { diff --git a/source/blender/bmesh/intern/bmesh_query.h b/source/blender/bmesh/intern/bmesh_query.h index fb646b11076..aaf8191c5db 100644 --- a/source/blender/bmesh/intern/bmesh_query.h +++ b/source/blender/bmesh/intern/bmesh_query.h @@ -226,6 +226,8 @@ bool BM_edge_is_all_face_flag_test(const BMEdge *e, bool BM_edge_is_any_vert_flag_test(const BMEdge *e, const char hflag) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); +bool BM_edge_is_any_face_flag_test(const BMEdge *e, const char hflag) ATTR_WARN_UNUSED_RESULT + ATTR_NONNULL(); bool BM_face_is_any_vert_flag_test(const BMFace *f, const char hflag) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); bool BM_face_is_any_edge_flag_test(const BMFace *f, const char hflag) ATTR_WARN_UNUSED_RESULT |