diff options
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_queries_inline.h')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_queries_inline.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_queries_inline.h b/source/blender/bmesh/intern/bmesh_queries_inline.h index a2a0a15faad..0856b9846c1 100644 --- a/source/blender/bmesh/intern/bmesh_queries_inline.h +++ b/source/blender/bmesh/intern/bmesh_queries_inline.h @@ -137,4 +137,17 @@ BLI_INLINE bool BM_loop_is_adjacent(const BMLoop *l_a, const BMLoop *l_b) return (ELEM(l_b, l_a->next, l_a->prev)); } +/** + * Check if we have a single wire edge user. + */ +BLI_INLINE bool BM_vert_is_wire_endpoint(const BMVert *v) +{ + const BMEdge *e = v->e; + if (e && e->l == NULL) { + const BMDiskLink *dl = (e->v1 == v) ? &e->v1_disk_link : &e->v2_disk_link; + return (dl->next == e); + } + return false; +} + #endif /* __BMESH_QUERIES_INLINE_H__ */ |