57 switch (ele_head->
htype) {
67#define BMO_elem_flag_test(bm, ele, oflag) \
68 _bmo_elem_flag_test(bm, BMO_elem_flag_from_header(&(ele)->head), oflag)
69#define BMO_elem_flag_test_bool(bm, ele, oflag) \
70 _bmo_elem_flag_test_bool(bm, BMO_elem_flag_from_header(&(ele)->head), oflag)
71#define BMO_elem_flag_enable(bm, ele, oflag) \
72 _bmo_elem_flag_enable( \
73 bm, (BM_CHECK_TYPE_ELEM_NONCONST(ele), BMO_elem_flag_from_header(&(ele)->head)), oflag)
74#define BMO_elem_flag_disable(bm, ele, oflag) \
75 _bmo_elem_flag_disable( \
76 bm, (BM_CHECK_TYPE_ELEM_NONCONST(ele), BMO_elem_flag_from_header(&(ele)->head)), oflag)
77#define BMO_elem_flag_set(bm, ele, oflag, val) \
78 _bmo_elem_flag_set(bm, \
79 (BM_CHECK_TYPE_ELEM_NONCONST(ele), BMO_elem_flag_from_header(&(ele)->head)), \
82#define BMO_elem_flag_toggle(bm, ele, oflag) \
83 _bmo_elem_flag_toggle( \
84 bm, (BM_CHECK_TYPE_ELEM_NONCONST(ele), BMO_elem_flag_from_header(&(ele)->head)), oflag)
88# define _BMO_CAST_V_CONST(e) \
91 (BM_CHECK_TYPE_VERT(_e), \
92 BLI_assert(((const BMHeader *)_e)->htype == BM_VERT), \
93 (const BMVert_OFlag *)_e); \
95# define _BMO_CAST_E_CONST(e) \
98 (BM_CHECK_TYPE_EDGE(_e), \
99 BLI_assert(((const BMHeader *)_e)->htype == BM_EDGE), \
100 (const BMEdge_OFlag *)_e); \
102# define _BMO_CAST_F_CONST(e) \
105 (BM_CHECK_TYPE_FACE(_e), \
106 BLI_assert(((const BMHeader *)_e)->htype == BM_FACE), \
107 (const BMFace_OFlag *)_e); \
109# define _BMO_CAST_V(e) \
112 (BM_CHECK_TYPE_VERT_NONCONST(_e), \
113 BLI_assert(((BMHeader *)_e)->htype == BM_VERT), \
114 (BMVert_OFlag *)_e); \
116# define _BMO_CAST_E(e) \
119 (BM_CHECK_TYPE_EDGE_NONCONST(_e), \
120 BLI_assert(((BMHeader *)_e)->htype == BM_EDGE), \
121 (BMEdge_OFlag *)_e); \
123# define _BMO_CAST_F(e) \
126 (BM_CHECK_TYPE_FACE_NONCONST(_e), \
127 BLI_assert(((BMHeader *)_e)->htype == BM_FACE), \
128 (BMFace_OFlag *)_e); \
131# define _BMO_CAST_V_CONST(e) (BM_CHECK_TYPE_VERT(e), (const BMVert_OFlag *)e)
132# define _BMO_CAST_E_CONST(e) (BM_CHECK_TYPE_EDGE(e), (const BMEdge_OFlag *)e)
133# define _BMO_CAST_F_CONST(e) (BM_CHECK_TYPE_FACE(e), (const BMFace_OFlag *)e)
134# define _BMO_CAST_V(e) (BM_CHECK_TYPE_VERT_NONCONST(e), (BMVert_OFlag *)e)
135# define _BMO_CAST_E(e) (BM_CHECK_TYPE_EDGE_NONCONST(e), (BMEdge_OFlag *)e)
136# define _BMO_CAST_F(e) (BM_CHECK_TYPE_FACE_NONCONST(e), (BMFace_OFlag *)e)
139#define BMO_vert_flag_test(bm, e, oflag) \
140 _bmo_elem_flag_test(bm, _BMO_CAST_V_CONST(e)->oflags, oflag)
141#define BMO_vert_flag_test_bool(bm, e, oflag) \
142 _bmo_elem_flag_test_bool(bm, _BMO_CAST_V_CONST(e)->oflags, oflag)
143#define BMO_vert_flag_enable(bm, e, oflag) _bmo_elem_flag_enable(bm, _BMO_CAST_V(e)->oflags, oflag)
144#define BMO_vert_flag_disable(bm, e, oflag) \
145 _bmo_elem_flag_disable(bm, _BMO_CAST_V(e)->oflags, oflag)
146#define BMO_vert_flag_set(bm, e, oflag, val) \
147 _bmo_elem_flag_set(bm, _BMO_CAST_V(e)->oflags, oflag, val)
148#define BMO_vert_flag_toggle(bm, e, oflag) _bmo_elem_flag_toggle(bm, _BMO_CAST_V(e)->oflags, oflag)
150#define BMO_edge_flag_test(bm, e, oflag) \
151 _bmo_elem_flag_test(bm, _BMO_CAST_E_CONST(e)->oflags, oflag)
152#define BMO_edge_flag_test_bool(bm, e, oflag) \
153 _bmo_elem_flag_test_bool(bm, _BMO_CAST_E_CONST(e)->oflags, oflag)
154#define BMO_edge_flag_enable(bm, e, oflag) _bmo_elem_flag_enable(bm, _BMO_CAST_E(e)->oflags, oflag)
155#define BMO_edge_flag_disable(bm, e, oflag) \
156 _bmo_elem_flag_disable(bm, _BMO_CAST_E(e)->oflags, oflag)
157#define BMO_edge_flag_set(bm, e, oflag, val) \
158 _bmo_elem_flag_set(bm, _BMO_CAST_E(e)->oflags, oflag, val)
159#define BMO_edge_flag_toggle(bm, e, oflag) _bmo_elem_flag_toggle(bm, _BMO_CAST_E(e)->oflags, oflag)
161#define BMO_face_flag_test(bm, e, oflag) \
162 _bmo_elem_flag_test(bm, _BMO_CAST_F_CONST(e)->oflags, oflag)
163#define BMO_face_flag_test_bool(bm, e, oflag) \
164 _bmo_elem_flag_test_bool(bm, _BMO_CAST_F_CONST(e)->oflags, oflag)
165#define BMO_face_flag_enable(bm, e, oflag) _bmo_elem_flag_enable(bm, _BMO_CAST_F(e)->oflags, oflag)
166#define BMO_face_flag_disable(bm, e, oflag) \
167 _bmo_elem_flag_disable(bm, _BMO_CAST_F(e)->oflags, oflag)
168#define BMO_face_flag_set(bm, e, oflag, val) \
169 _bmo_elem_flag_set(bm, _BMO_CAST_F(e)->oflags, oflag, val)
170#define BMO_face_flag_toggle(bm, e, oflag) _bmo_elem_flag_toggle(bm, _BMO_CAST_F(e)->oflags, oflag)
200#define BMO_OP_SLOT_TOTAL_TYPES 11
271#define BMO_SLOT_AS_BOOL(slot) ((slot)->data.i)
272#define BMO_SLOT_AS_INT(slot) ((slot)->data.i)
273#define BMO_SLOT_AS_FLOAT(slot) ((slot)->data.f)
274#define BMO_SLOT_AS_VECTOR(slot) ((slot)->data.vec)
275#define BMO_SLOT_AS_MATRIX(slot) ((float(*)[4])((slot)->data.p))
276#define BMO_SLOT_AS_BUFFER(slot) ((slot)->data.buf)
277#define BMO_SLOT_AS_GHASH(slot) ((slot)->data.ghash)
279#define BMO_ASSERT_SLOT_IN_OP(slot, op) \
280 BLI_assert(((slot >= (op)->slots_in) && (slot < &(op)->slots_in[BMO_OP_MAX_SLOTS])) || \
281 ((slot >= (op)->slots_out) && (slot < &(op)->slots_out[BMO_OP_MAX_SLOTS])))
284#define BMO_OP_MAX_SLOTS 21
312#define BMO_FLAG_DEFAULTS BMO_FLAG_RESPECT_HIDE
314#define MAX_SLOTNAME 32
490#define BMO_slot_copy(op_src, slots_src, slot_name_src, op_dst, slots_dst, slot_name_dst) \
492 (op_src)->slots_src, slot_name_src, (op_dst)->slots_dst, slot_name_dst, (op_dst)->arena)
501 const char *slot_name_src,
503 const char *slot_name_dst,
567 const char *slot_name,
579 const char *slot_name,
583 const char *slot_name,
586 const char *slot_name,
602#define BMO_slot_buffer_append( \
603 op_src, slots_src, slot_name_src, op_dst, slots_dst, slot_name_dst) \
604 _bmo_slot_buffer_append( \
605 (op_src)->slots_src, slot_name_src, (op_dst)->slots_dst, slot_name_dst, (op_dst)->arena)
610 const char *slot_name_dst,
612 const char *slot_name_src,
621 const char *slot_name,
631 const char *slot_name,
642 const char *slot_name,
652 const char *slot_name,
664 const char *slot_name,
676 const char *slot_name,
688 const char *slot_name,
698 const char *slot_name,
727 const char *slot_name,
733 const char *slot_name,
744 const char *slot_name,
803 const char *slot_name,
818#define BMO_ITER(ele, iter, slot_args, slot_name, restrict_flag) \
819 for (BM_CHECK_TYPE_ELEM_ASSIGN(ele) = BMO_iter_new(iter, slot_args, slot_name, restrict_flag); \
821 BM_CHECK_TYPE_ELEM_ASSIGN(ele) = BMO_iter_step(iter))
823#define BMO_ITER_INDEX(ele, iter, slot_args, slot_name, restrict_flag, i_) \
824 for (BM_CHECK_TYPE_ELEM_ASSIGN(ele) = BMO_iter_new(iter, slot_args, slot_name, restrict_flag), \
827 BM_CHECK_TYPE_ELEM_ASSIGN(ele) = BMO_iter_step(iter), i_++)
#define ENUM_OPERATORS(_type, _max)
ATTR_WARN_UNUSED_RESULT BMesh * bm
void * BMO_slot_buffer_alloc(BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, int len)
struct BMO_FlagSet BMO_FlagSet
@ BMO_OP_SLOT_SUBTYPE_PTR_BMESH
@ BMO_OP_SLOT_SUBTYPE_PTR_OBJECT
@ BMO_OP_SLOT_SUBTYPE_PTR_SCENE
@ BMO_OP_SLOT_SUBTYPE_PTR_MESH
@ BMO_OP_SLOT_SUBTYPE_PTR_STRUCT
void BMO_op_flag_disable(BMesh *bm, BMOperator *op, int op_flag)
BLI_INLINE void _bmo_elem_flag_enable(BMesh *bm, BMFlagLayer *oflags, short oflag)
void BMO_slot_mat4_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, float r_mat[4][4])
@ BMO_SYMMETRIZE_NEGATIVE_X
@ BMO_SYMMETRIZE_NEGATIVE_Y
@ BMO_SYMMETRIZE_POSITIVE_Z
@ BMO_SYMMETRIZE_NEGATIVE_Z
@ BMO_SYMMETRIZE_POSITIVE_Y
@ BMO_SYMMETRIZE_POSITIVE_X
void _bmo_slot_copy(BMOpSlot slot_args_src[BMO_OP_MAX_SLOTS], const char *slot_name_src, BMOpSlot slot_args_dst[BMO_OP_MAX_SLOTS], const char *slot_name_dst, struct MemArena *arena_dst)
BMESH OPSTACK COPY SLOT.
void * BMO_slot_buffer_get_single(BMOpSlot *slot)
void BMO_slot_buffer_from_disabled_hflag(BMesh *bm, BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, char htype, char hflag)
void BMO_slot_vec_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const float vec[3])
void BMO_slot_buffer_flag_enable(BMesh *bm, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, char htype, short oflag)
BMO_FLAG_BUFFER.
bool BMO_op_vinitf(BMesh *bm, BMOperator *op, int flag, const char *fmt, va_list vlist)
void BMO_slot_buffer_hflag_enable(BMesh *bm, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, char htype, char hflag, bool do_flush)
BMO_FLAG_BUFFER.
void * BMO_slot_ptr_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
bool BMO_iter_map_value_bool(BMOIter *iter)
void BMO_slot_map_to_flag(BMesh *bm, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, char htype, short oflag)
void BMO_mesh_flag_disable_all(BMesh *bm, BMOperator *op, char htype, short oflag)
void * BMO_iter_map_value_ptr(BMOIter *iter)
void BMO_slot_mat_set(BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const float *mat, int size)
@ BMO_OP_SLOT_SUBTYPE_ELEM_EDGE
@ BMO_OP_SLOT_SUBTYPE_ELEM_FACE
@ BMO_OP_SLOT_SUBTYPE_ELEM_IS_SINGLE
@ BMO_OP_SLOT_SUBTYPE_ELEM_VERT
@ BMO_OP_SLOT_ELEMENT_BUF
void ** BMO_iter_map_value_p(BMOIter *iter)
void BMO_slot_buffer_from_disabled_flag(BMesh *bm, BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, char htype, short oflag)
int BMO_mesh_disabled_flag_count(BMesh *bm, char htype, short oflag)
void BMO_slot_vec_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, float r_vec[3])
void BMO_slot_buffer_hflag_disable(BMesh *bm, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, char htype, char hflag, bool do_flush)
BMO_FLAG_BUFFER.
int BMO_slot_map_len(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
BLI_INLINE bool _bmo_elem_flag_test_bool(BMesh *bm, const BMFlagLayer *oflags, short oflag)
void BMO_mesh_selected_remap(BMesh *bm, BMOpSlot *slot_vert_map, BMOpSlot *slot_edge_map, BMOpSlot *slot_face_map, bool check_select)
float BMO_slot_float_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
void BMO_slot_buffer_from_single(BMOperator *op, BMOpSlot *slot, BMHeader *ele)
void _bmo_slot_buffer_append(BMOpSlot slot_args_dst[BMO_OP_MAX_SLOTS], const char *slot_name_dst, BMOpSlot slot_args_src[BMO_OP_MAX_SLOTS], const char *slot_name_src, struct MemArena *arena_dst)
void BMO_slot_buffer_from_enabled_hflag(BMesh *bm, BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, char htype, char hflag)
struct BMOperator BMOperator
int BMO_iter_map_value_int(BMOIter *iter)
void BMO_slot_float_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, float f)
void * BMO_iter_new(BMOIter *iter, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, char restrictmask)
New Iterator.
BMOpSlot * BMO_slot_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *identifier)
BMESH OPSTACK GET SLOT.
BLI_INLINE short _bmo_elem_flag_test(BMesh *bm, const BMFlagLayer *oflags, short oflag)
void BMO_op_exec(BMesh *bm, BMOperator *op)
BMESH OPSTACK EXEC OP.
void BMO_pop(BMesh *bm)
BMESH OPSTACK POP.
@ BMO_OP_SLOT_SUBTYPE_MAP_ELEM
@ BMO_OP_SLOT_SUBTYPE_MAP_BOOL
@ BMO_OP_SLOT_SUBTYPE_MAP_INTERNAL
@ BMO_OP_SLOT_SUBTYPE_MAP_INT
@ BMO_OP_SLOT_SUBTYPE_MAP_EMPTY
@ BMO_OP_SLOT_SUBTYPE_MAP_FLT
void BMO_slot_buffer_from_enabled_flag(BMesh *bm, BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, char htype, short oflag)
void * BMO_slot_buffer_get_first(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
void BMO_push(BMesh *bm, BMOperator *op)
BMESH OPSTACK PUSH.
int BMO_opcode_from_opname(const char *opname)
struct BMOpDefine BMOpDefine
BLI_INLINE void _bmo_elem_flag_set(BMesh *bm, BMFlagLayer *oflags, short oflag, int val)
BLI_INLINE BMFlagLayer * BMO_elem_flag_from_header(BMHeader *ele_head)
void BMO_op_flag_enable(BMesh *bm, BMOperator *op, int op_flag)
@ BMO_OP_SLOT_SUBTYPE_INT_FLAG
@ BMO_OP_SLOT_SUBTYPE_INT_ENUM
const int BMO_OPSLOT_TYPEINFO[BMO_OP_SLOT_TOTAL_TYPES]
void BMO_slot_int_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, int i)
void BMO_op_init(BMesh *bm, BMOperator *op, int flag, const char *opname)
BMESH OPSTACK INIT OP.
float BMO_iter_map_value_float(BMOIter *iter)
void BMO_slot_mat3_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, float r_mat[3][3])
void BMO_slot_buffer_from_array(BMOperator *op, BMOpSlot *slot, BMHeader **ele_buffer, int ele_buffer_len)
bool BMO_op_initf(BMesh *bm, BMOperator *op, int flag, const char *fmt,...)
int BMO_slot_int_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
void BMO_op_finish(BMesh *bm, BMOperator *op)
BMESH OPSTACK FINISH OP.
struct BMOSlotType BMOSlotType
void BMO_slot_map_insert(BMOperator *op, BMOpSlot *slot, const void *element, const void *data)
int BMO_slot_buffer_len(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
void * BMO_slot_as_arrayN(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, int *len)
#define BMO_OP_SLOT_TOTAL_TYPES
void BMO_slot_ptr_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, void *p)
bool BMO_op_callf(BMesh *bm, int flag, const char *fmt,...)
void BMO_slot_buffer_from_all(BMesh *bm, BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, char htype)
BMO_ALL_TO_SLOT.
@ DEL_FACES_KEEP_BOUNDARY
void BMO_slot_bool_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, bool i)
void BMO_slot_buffer_flag_disable(BMesh *bm, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, char htype, short oflag)
BMO_FLAG_BUFFER.
BLI_INLINE void _bmo_elem_flag_disable(BMesh *bm, BMFlagLayer *oflags, short oflag)
int BMO_mesh_enabled_flag_count(BMesh *bm, char htype, short oflag)
union eBMOpSlotSubType_Union eBMOpSlotSubType_Union
@ BMO_OPTYPE_FLAG_INVALIDATE_CLNOR_ALL
@ BMO_OPTYPE_FLAG_SELECT_VALIDATE
@ BMO_OPTYPE_FLAG_UNTAN_MULTIRES
@ BMO_OPTYPE_FLAG_NORMALS_CALC
@ BMO_OPTYPE_FLAG_SELECT_FLUSH
BLI_INLINE void _bmo_elem_flag_toggle(BMesh *bm, BMFlagLayer *oflags, short oflag)
bool BMO_slot_exists(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *identifier)
BMESH OPSTACK HAS SLOT.
bool BMO_slot_bool_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
void * BMO_iter_step(BMOIter *iter)
ATTR_WARN_UNUSED_RESULT const BMFlagLayer const short oflag
ATTR_WARN_UNUSED_RESULT const BMFlagLayer * oflags
static void exec(void *data, int, bNode *node, bNodeExecData *execdata, bNodeStack **in, bNodeStack **out)
eBMOpSlotSubType_Union subtype
BMOSlotType slot_types_in[BMO_OP_MAX_SLOTS]
BMOSlotType slot_types_out[BMO_OP_MAX_SLOTS]
void(* exec)(BMesh *bm, BMOperator *op)
eBMOpSlotSubType_Union slot_subtype
union BMOpSlot::@139 data
struct BMOpSlot::@139::@140 enum_data
eBMOpSlotSubType_Int intg
eBMOpSlotSubType_Elem elem