Blender  V2.93
bmesh_callback_generic.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
23 #include "BLI_utildefines.h"
24 
25 #include "bmesh.h"
26 
28 
30 {
31  const uint hflag_pair = POINTER_AS_INT(user_data);
32  const char hflag_p = (hflag_pair & 0xff);
33  const char hflag_n = (hflag_pair >> 8);
34 
35  return ((BM_elem_flag_test(ele, hflag_p) != 0) && (BM_elem_flag_test(ele, hflag_n) == 0));
36 }
37 
39 {
40  const char hflag = POINTER_AS_INT(user_data);
41 
42  return (BM_elem_flag_test(ele, hflag) != 0);
43 }
44 
46 {
47  const char hflag = POINTER_AS_INT(user_data);
48 
49  return (BM_elem_flag_test(ele, hflag) == 0);
50 }
51 
53 {
54  return (ele != user_data);
55 }
unsigned int uint
Definition: BLI_sys_types.h:83
#define POINTER_AS_INT(i)
bool BM_elem_cb_check_hflag_enabled(BMElem *ele, void *user_data)
bool BM_elem_cb_check_hflag_ex(BMElem *ele, void *user_data)
bool BM_elem_cb_check_elem_not_equal(BMElem *ele, void *user_data)
bool BM_elem_cb_check_hflag_disabled(BMElem *ele, void *user_data)
#define BM_elem_flag_test(ele, hflag)
Definition: bmesh_inline.h:26
void * user_data