diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-11-02 01:31:01 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-11-02 02:09:14 +0300 |
commit | b7174c9320c5e3446d8237059841d982279e32e9 (patch) | |
tree | dff0041b0846622804bd44fbd5137ddbd5996ff9 /source/blender/bmesh/intern/bmesh_callback_generic.h | |
parent | e8b8ee7d280b99f6b3d253a30822c98a3c38c2c5 (diff) |
Fix connect-vertices failing for concave ngons
Also add:
- generic callback for bmesh elements.
- ability to pass an existing array to a bmesh operator.
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_callback_generic.h')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_callback_generic.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_callback_generic.h b/source/blender/bmesh/intern/bmesh_callback_generic.h new file mode 100644 index 00000000000..8c46128f3b0 --- /dev/null +++ b/source/blender/bmesh/intern/bmesh_callback_generic.h @@ -0,0 +1,44 @@ +/* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#ifndef __BMESH_CALLBACK_GENERIC_H__ +#define __BMESH_CALLBACK_GENERIC_H__ + +/** \file blender/bmesh/intern/bmesh_callback_generic.h + * \ingroup bmesh + */ + +bool BM_elem_cb_check_hflag_enabled(BMElem *, void *user_data); +bool BM_elem_cb_check_hflag_disabled(BMElem *, void *user_data); +bool BM_elem_cb_check_hflag_ex(BMElem *, void *user_data); + +#define BM_elem_cb_check_hflag_ex_simple(type, hflag_p, hflag_n) \ + (bool (*)(type, void *))BM_elem_cb_check_hflag_ex, \ + SET_UINT_IN_POINTER(((hflag_p) | (hflag_n << 8))) + +#define BM_elem_cb_check_hflag_enabled_simple(type, hflag_p) \ + (bool (*)(type, void *))BM_elem_cb_check_hflag_enabled, \ + SET_UINT_IN_POINTER((hflag_p)) + +#define BM_elem_cb_check_hflag_disabled_simple(type, hflag_n) \ + (bool (*)(type, void *))BM_elem_cb_check_hflag_disabled, \ + SET_UINT_IN_POINTER(hflag_n) + +#endif /* __BMESH_CALLBACK_GENERIC_H__ */ |