Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-10-26 10:19:49 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-26 10:19:49 +0400
commit2d39533da8d69425759628f42acd80534c65c122 (patch)
treeabf1d98caf5abb802a400abc3d246d5bb45174f7 /source/blender/bmesh/intern/bmesh_inline.h
parent3b7dee7cbac6c55e1ecf56e1d344bc82aa767c51 (diff)
add a function for merging 2 bmesh element flags into a 3rd item.
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_inline.h')
-rw-r--r--source/blender/bmesh/intern/bmesh_inline.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_inline.h b/source/blender/bmesh/intern/bmesh_inline.h
index 400f4a55b0e..04b214f725a 100644
--- a/source/blender/bmesh/intern/bmesh_inline.h
+++ b/source/blender/bmesh/intern/bmesh_inline.h
@@ -37,6 +37,7 @@
#define BM_elem_flag_set( ele, hflag, val) _bm_elem_flag_set (&(ele)->head, hflag, val)
#define BM_elem_flag_toggle( ele, hflag) _bm_elem_flag_toggle (&(ele)->head, hflag)
#define BM_elem_flag_merge( ele_a, ele_b) _bm_elem_flag_merge (&(ele_a)->head, &(ele_b)->head)
+#define BM_elem_flag_merge_into(ele, ele_a, ele_b)_bm_elem_flag_merge_into (&(ele)->head, &(ele_a)->head, &(ele_b)->head)
BLI_INLINE char _bm_elem_flag_test(const BMHeader *head, const char hflag)
{
@@ -74,6 +75,11 @@ BLI_INLINE void _bm_elem_flag_merge(BMHeader *head_a, BMHeader *head_b)
head_a->hflag = head_b->hflag = head_a->hflag | head_b->hflag;
}
+BLI_INLINE void _bm_elem_flag_merge_into(BMHeader *head, const BMHeader *head_a, const BMHeader *head_b)
+{
+ head->hflag = head_a->hflag | head_b->hflag;
+}
+
/**
* notes on #BM_elem_index_set(...) usage,
* Set index is sometimes abused as temp storage, other times we cant be