Blender V5.3
bmesh_operator_api.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
10
11#include "BLI_enum_flags.hh"
12#include "BLI_ghash.hh"
13
14#include <cstdarg>
15
16#include "bmesh_class.hh"
17
18namespace blender {
19
57
58struct GHashIterator;
59
61{
62 switch (ele_head->htype) {
63 case BM_VERT:
64 return (reinterpret_cast<BMVert_OFlag *>(ele_head))->oflags;
65 case BM_EDGE:
66 return (reinterpret_cast<BMEdge_OFlag *>(ele_head))->oflags;
67 default:
68 return (reinterpret_cast<BMFace_OFlag *>(ele_head))->oflags;
69 }
70}
71
72#define BMO_elem_flag_test(bm, ele, oflag) \
73 _bmo_elem_flag_test(bm, BMO_elem_flag_from_header(&(ele)->head), oflag)
74#define BMO_elem_flag_test_bool(bm, ele, oflag) \
75 _bmo_elem_flag_test_bool(bm, BMO_elem_flag_from_header(&(ele)->head), oflag)
76#define BMO_elem_flag_enable(bm, ele, oflag) \
77 _bmo_elem_flag_enable( \
78 bm, (BM_CHECK_TYPE_ELEM_NONCONST(ele), BMO_elem_flag_from_header(&(ele)->head)), oflag)
79#define BMO_elem_flag_disable(bm, ele, oflag) \
80 _bmo_elem_flag_disable( \
81 bm, (BM_CHECK_TYPE_ELEM_NONCONST(ele), BMO_elem_flag_from_header(&(ele)->head)), oflag)
82#define BMO_elem_flag_set(bm, ele, oflag, val) \
83 _bmo_elem_flag_set(bm, \
84 (BM_CHECK_TYPE_ELEM_NONCONST(ele), BMO_elem_flag_from_header(&(ele)->head)), \
85 oflag, \
86 val)
87#define BMO_elem_flag_toggle(bm, ele, oflag) \
88 _bmo_elem_flag_toggle( \
89 bm, (BM_CHECK_TYPE_ELEM_NONCONST(ele), BMO_elem_flag_from_header(&(ele)->head)), oflag)
90
91/* take care not to instantiate args multiple times */
92#ifdef __GNUC___
93# define _BMO_CAST_V_CONST(e) \
94 ({ \
95 typeof(e) _e = e; \
96 (BM_CHECK_TYPE_VERT(_e), \
97 BLI_assert(((const BMHeader *)_e)->htype == BM_VERT), \
98 (const BMVert_OFlag *)_e); \
99 })
100# define _BMO_CAST_E_CONST(e) \
101 ({ \
102 typeof(e) _e = e; \
103 (BM_CHECK_TYPE_EDGE(_e), \
104 BLI_assert(((const BMHeader *)_e)->htype == BM_EDGE), \
105 (const BMEdge_OFlag *)_e); \
106 })
107# define _BMO_CAST_F_CONST(e) \
108 ({ \
109 typeof(e) _e = e; \
110 (BM_CHECK_TYPE_FACE(_e), \
111 BLI_assert(((const BMHeader *)_e)->htype == BM_FACE), \
112 (const BMFace_OFlag *)_e); \
113 })
114# define _BMO_CAST_V(e) \
115 ({ \
116 typeof(e) _e = e; \
117 (BM_CHECK_TYPE_VERT_NONCONST(_e), \
118 BLI_assert(((BMHeader *)_e)->htype == BM_VERT), \
119 (BMVert_OFlag *)_e); \
120 })
121# define _BMO_CAST_E(e) \
122 ({ \
123 typeof(e) _e = e; \
124 (BM_CHECK_TYPE_EDGE_NONCONST(_e), \
125 BLI_assert(((BMHeader *)_e)->htype == BM_EDGE), \
126 (BMEdge_OFlag *)_e); \
127 })
128# define _BMO_CAST_F(e) \
129 ({ \
130 typeof(e) _e = e; \
131 (BM_CHECK_TYPE_FACE_NONCONST(_e), \
132 BLI_assert(((BMHeader *)_e)->htype == BM_FACE), \
133 (BMFace_OFlag *)_e); \
134 })
135#else
136# define _BMO_CAST_V_CONST(e) (BM_CHECK_TYPE_VERT(e), (const BMVert_OFlag *)e)
137# define _BMO_CAST_E_CONST(e) (BM_CHECK_TYPE_EDGE(e), (const BMEdge_OFlag *)e)
138# define _BMO_CAST_F_CONST(e) (BM_CHECK_TYPE_FACE(e), (const BMFace_OFlag *)e)
139# define _BMO_CAST_V(e) (BM_CHECK_TYPE_VERT_NONCONST(e), (BMVert_OFlag *)e)
140# define _BMO_CAST_E(e) (BM_CHECK_TYPE_EDGE_NONCONST(e), (BMEdge_OFlag *)e)
141# define _BMO_CAST_F(e) (BM_CHECK_TYPE_FACE_NONCONST(e), (BMFace_OFlag *)e)
142#endif
143
144#define BMO_vert_flag_test(bm, e, oflag) \
145 _bmo_elem_flag_test(bm, _BMO_CAST_V_CONST(e)->oflags, oflag)
146#define BMO_vert_flag_test_bool(bm, e, oflag) \
147 _bmo_elem_flag_test_bool(bm, _BMO_CAST_V_CONST(e)->oflags, oflag)
148#define BMO_vert_flag_enable(bm, e, oflag) _bmo_elem_flag_enable(bm, _BMO_CAST_V(e)->oflags, oflag)
149#define BMO_vert_flag_disable(bm, e, oflag) \
150 _bmo_elem_flag_disable(bm, _BMO_CAST_V(e)->oflags, oflag)
151#define BMO_vert_flag_set(bm, e, oflag, val) \
152 _bmo_elem_flag_set(bm, _BMO_CAST_V(e)->oflags, oflag, val)
153#define BMO_vert_flag_toggle(bm, e, oflag) _bmo_elem_flag_toggle(bm, _BMO_CAST_V(e)->oflags, oflag)
154
155#define BMO_edge_flag_test(bm, e, oflag) \
156 _bmo_elem_flag_test(bm, _BMO_CAST_E_CONST(e)->oflags, oflag)
157#define BMO_edge_flag_test_bool(bm, e, oflag) \
158 _bmo_elem_flag_test_bool(bm, _BMO_CAST_E_CONST(e)->oflags, oflag)
159#define BMO_edge_flag_enable(bm, e, oflag) _bmo_elem_flag_enable(bm, _BMO_CAST_E(e)->oflags, oflag)
160#define BMO_edge_flag_disable(bm, e, oflag) \
161 _bmo_elem_flag_disable(bm, _BMO_CAST_E(e)->oflags, oflag)
162#define BMO_edge_flag_set(bm, e, oflag, val) \
163 _bmo_elem_flag_set(bm, _BMO_CAST_E(e)->oflags, oflag, val)
164#define BMO_edge_flag_toggle(bm, e, oflag) _bmo_elem_flag_toggle(bm, _BMO_CAST_E(e)->oflags, oflag)
165
166#define BMO_face_flag_test(bm, e, oflag) \
167 _bmo_elem_flag_test(bm, _BMO_CAST_F_CONST(e)->oflags, oflag)
168#define BMO_face_flag_test_bool(bm, e, oflag) \
169 _bmo_elem_flag_test_bool(bm, _BMO_CAST_F_CONST(e)->oflags, oflag)
170#define BMO_face_flag_enable(bm, e, oflag) _bmo_elem_flag_enable(bm, _BMO_CAST_F(e)->oflags, oflag)
171#define BMO_face_flag_disable(bm, e, oflag) \
172 _bmo_elem_flag_disable(bm, _BMO_CAST_F(e)->oflags, oflag)
173#define BMO_face_flag_set(bm, e, oflag, val) \
174 _bmo_elem_flag_set(bm, _BMO_CAST_F(e)->oflags, oflag, val)
175#define BMO_face_flag_toggle(bm, e, oflag) _bmo_elem_flag_toggle(bm, _BMO_CAST_F(e)->oflags, oflag)
176
183
184/* slot type arrays are terminated by the last member
185 * having a slot type of 0 */
187 /* BMO_OP_SLOT_SENTINEL = 0, */
191
192 /* normally store pointers to object, scene,
193 * _never_ store arrays corresponding to mesh elements with this */
194 BMO_OP_SLOT_PTR = 4, /* requires subtype BMO_OP_SLOT_SUBTYPE_PTR_xxx */
197
198 /* after BMO_OP_SLOT_VEC, everything is dynamically allocated arrays.
199 * We leave a space in the identifiers for future growth.
200 *
201 * it's very important this remain a power of two */
202 BMO_OP_SLOT_ELEMENT_BUF = 9, /* list of verts/edges/faces */
203 BMO_OP_SLOT_MAPPING = 10 /* simple hash map, requires subtype BMO_OP_SLOT_SUBTYPE_MAP_xxx */
204};
205#define BMO_OP_SLOT_TOTAL_TYPES 11
206
207/* don't overlap values to avoid confusion */
216
236
243
245 int value;
246 const char *identifier;
247};
248
249/* please ignore all these structures, don't touch them in tool code, except
250 * for when your defining an operator with BMOpDefine. */
251
252struct BMOpSlot {
253 const char *slot_name; /* pointer to BMOpDefine.slot_args */
256
257 int len;
258 // int flag; /* UNUSED */
259 // int index; /* index within slot array */ /* UNUSED */
260 union {
261 int i;
262 float f;
263 void *p;
264 float vec[3];
265 void **buf;
266 GHash *ghash;
267 struct {
269 int _i;
271 } enum_data;
273};
274
275/* mainly for use outside bmesh internal code */
276#define BMO_SLOT_AS_BOOL(slot) ((slot)->data.i)
277#define BMO_SLOT_AS_INT(slot) ((slot)->data.i)
278#define BMO_SLOT_AS_FLOAT(slot) ((slot)->data.f)
279#define BMO_SLOT_AS_VECTOR(slot) ((slot)->data.vec)
280#define BMO_SLOT_AS_MATRIX(slot) ((float (*)[4])((slot)->data.p))
281#define BMO_SLOT_AS_BUFFER(slot) ((slot)->data.buf)
282#define BMO_SLOT_AS_GHASH(slot) ((slot)->data.ghash)
283
284#define BMO_ASSERT_SLOT_IN_OP(slot, op) \
285 BLI_assert(((slot >= (op)->slots_in) && (slot < &(op)->slots_in[BMO_OP_MAX_SLOTS])) || \
286 ((slot >= (op)->slots_out) && (slot < &(op)->slots_out[BMO_OP_MAX_SLOTS])))
287
288/* Limit hit, so expanded for bevel operator. Compiler complains if limit is hit. */
289#define BMO_OP_MAX_SLOTS 21
290
291/* BMOpDefine->type_flag */
302
306 void (*exec)(BMesh *bm, struct BMOperator *op);
308 int type;
310 int flag; /* runtime options */
311};
312
313enum {
315};
316
317#define BMO_FLAG_DEFAULTS BMO_FLAG_RESPECT_HIDE
318
319#define MAX_SLOTNAME 32
320
327
340
341/* -------------------------------------------------------------------- */
347
353void BMO_op_init(BMesh *bm, BMOperator *op, int flag, const char *opname);
354
364void BMO_op_exec(BMesh *bm, BMOperator *op);
365
373void BMO_op_finish(BMesh *bm, BMOperator *op);
374
379int BMO_mesh_enabled_flag_count(BMesh *bm, char htype, short oflag);
380
385int BMO_mesh_disabled_flag_count(BMesh *bm, char htype, short oflag);
386
392void BMO_push(BMesh *bm, BMOperator *op);
400void BMO_pop(BMesh *bm);
401
403
404/* -------------------------------------------------------------------- */
460
462bool BMO_op_callf(BMesh *bm, int flag, const char *fmt, ...);
463
465bool BMO_op_vcallf(BMesh *bm, int flag, const char *fmt, va_list list);
466
472bool BMO_op_initf(BMesh *bm, BMOperator *op, int flag, const char *fmt, ...);
473
478bool BMO_op_vinitf(BMesh *bm, BMOperator *op, int flag, const char *fmt, va_list vlist);
479
481
482/* -------------------------------------------------------------------- */
485
491bool BMO_slot_exists(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *identifier);
492
493/* get a pointer to a slot. this may be removed layer on from the public API. */
499BMOpSlot *BMO_slot_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *identifier);
500
501/* copies the data of a slot from one operator to another. src and dst are the
502 * source/destination slot codes, respectively. */
503#define BMO_slot_copy(op_src, slots_src, slot_name_src, op_dst, slots_dst, slot_name_dst) \
504 _bmo_slot_copy( \
505 (op_src)->slots_src, slot_name_src, (op_dst)->slots_dst, slot_name_dst, (op_dst)->arena)
506
513void _bmo_slot_copy(BMOpSlot slot_args_src[BMO_OP_MAX_SLOTS],
514 const char *slot_name_src,
515 BMOpSlot slot_args_dst[BMO_OP_MAX_SLOTS],
516 const char *slot_name_dst,
517 struct MemArena *arena_dst);
518
520
522enum {
528 /* A version of 'DEL_FACES' that keeps edges on face boundaries,
529 * allowing the surrounding edge-loop to be kept from removed face regions. */
532};
533
543
552
553void BMO_op_flag_enable(BMesh *bm, BMOperator *op, int op_flag);
554void BMO_op_flag_disable(BMesh *bm, BMOperator *op, int op_flag);
555
556/* -------------------------------------------------------------------- */
559
560void BMO_slot_float_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, float f);
561float BMO_slot_float_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name);
562void BMO_slot_int_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, int i);
563int BMO_slot_int_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name);
564void BMO_slot_bool_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, bool i);
565bool BMO_slot_bool_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name);
569void *BMO_slot_as_arrayN(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, int *len);
570
577void BMO_slot_ptr_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, void *p);
578void *BMO_slot_ptr_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name);
579void BMO_slot_vec_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
580 const char *slot_name,
581 const float vec[3]);
582void BMO_slot_vec_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, float r_vec[3]);
583
590void BMO_slot_mat_set(BMOperator *op,
591 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
592 const char *slot_name,
593 const float *mat,
594 int size);
595void BMO_slot_mat4_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
596 const char *slot_name,
597 float r_mat[4][4]);
598void BMO_slot_mat3_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
599 const char *slot_name,
600 float r_mat[3][3]);
601
603
604void BMO_mesh_flag_disable_all(BMesh *bm, BMOperator *op, char htype, short oflag);
605
606void BMO_mesh_selected_remap(BMesh *bm,
607 BMOpSlot *slot_vert_map,
608 BMOpSlot *slot_edge_map,
609 BMOpSlot *slot_face_map,
610 bool check_select);
611
615#define BMO_slot_buffer_append( \
616 op_src, slots_src, slot_name_src, op_dst, slots_dst, slot_name_dst) \
617 _bmo_slot_buffer_append( \
618 (op_src)->slots_src, slot_name_src, (op_dst)->slots_dst, slot_name_dst, (op_dst)->arena)
622void _bmo_slot_buffer_append(BMOpSlot slot_args_dst[BMO_OP_MAX_SLOTS],
623 const char *slot_name_dst,
624 BMOpSlot slot_args_src[BMO_OP_MAX_SLOTS],
625 const char *slot_name_src,
626 struct MemArena *arena_dst);
627
632 BMOperator *op,
633 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
634 const char *slot_name,
635 char htype,
636 short oflag);
637
642 BMOperator *op,
643 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
644 const char *slot_name,
645 char htype,
646 short oflag);
647
654 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
655 const char *slot_name,
656 char htype,
657 short oflag);
664 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
665 const char *slot_name,
666 char htype,
667 short oflag);
668
676 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
677 const char *slot_name,
678 char htype,
679 char hflag,
680 bool do_flush);
688 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
689 const char *slot_name,
690 char htype,
691 char hflag,
692 bool do_flush);
693
699 BMOperator *op,
700 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
701 const char *slot_name,
702 char htype,
703 char hflag);
709 BMOperator *op,
710 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
711 const char *slot_name,
712 char htype,
713 char hflag);
714
715void BMO_slot_buffer_from_array(BMOperator *op,
716 BMOpSlot *slot,
717 BMHeader **ele_buffer,
718 int ele_buffer_len);
719
720void BMO_slot_buffer_from_single(BMOperator *op, BMOpSlot *slot, BMHeader *ele);
721void *BMO_slot_buffer_get_single(BMOpSlot *slot);
722
724int BMO_slot_buffer_len(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name);
726int BMO_slot_map_len(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name);
727
732void BMO_slot_map_insert(BMOperator *op, BMOpSlot *slot, const void *element, const void *data);
733
738void BMO_slot_map_to_flag(BMesh *bm,
739 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
740 const char *slot_name,
741 char htype,
742 short oflag);
743
744void *BMO_slot_buffer_alloc(BMOperator *op,
745 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
746 const char *slot_name,
747 int len);
748
754void BMO_slot_buffer_from_all(BMesh *bm,
755 BMOperator *op,
756 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
757 const char *slot_name,
758 char htype);
759
794
795/* contents of this structure are private,
796 * don't directly access. */
797struct BMOIter {
799 int cur; // for arrays
801 void **val;
804};
805
806void *BMO_slot_buffer_get_first(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name);
807
815void *BMO_iter_new(BMOIter *iter,
816 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
817 const char *slot_name,
818 char restrictmask);
819void *BMO_iter_step(BMOIter *iter);
820
825void **BMO_iter_map_value_p(BMOIter *iter);
827
831
832#define BMO_ITER(ele, iter, slot_args, slot_name, restrict_flag) \
833 for (BM_CHECK_TYPE_ELEM_ASSIGN(ele) = BMO_iter_new(iter, slot_args, slot_name, restrict_flag); \
834 ele; \
835 BM_CHECK_TYPE_ELEM_ASSIGN(ele) = BMO_iter_step(iter))
836
837#define BMO_ITER_INDEX(ele, iter, slot_args, slot_name, restrict_flag, i_) \
838 for (BM_CHECK_TYPE_ELEM_ASSIGN(ele) = BMO_iter_new(iter, slot_args, slot_name, restrict_flag), \
839 i_ = 0; \
840 ele; \
841 BM_CHECK_TYPE_ELEM_ASSIGN(ele) = BMO_iter_step(iter), i_++)
842
843/* operator slot type information - size of one element of the type given. */
845
846int BMO_opcode_from_opname(const char *opname);
847
848} // namespace blender
#define ENUM_OPERATORS(_enum_type)
#define BLI_INLINE
#define MAX_SLOTNAME
#define BMO_OP_MAX_SLOTS
#define BMO_OP_SLOT_TOTAL_TYPES
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition btDbvt.cpp:52
ccl_device_inline dual1 len(const ccl_private dual< T > &a)
Definition math_dual.h:263
BMesh Iterators.
void BMO_slot_ptr_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, void *p)
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_as_arrayN(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, int *len)
int BMO_slot_int_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
@ BMO_OP_SLOT_SUBTYPE_MAP_INTERNAL
@ BMO_OP_SLOT_SUBTYPE_MAP_EMPTY
int BMO_slot_buffer_len(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
int BMO_iter_map_value_int(BMOIter *iter)
int BMO_mesh_enabled_flag_count(BMesh *bm, char htype, short oflag)
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_buffer_from_array(BMOperator *op, BMOpSlot *slot, BMHeader **ele_buffer, int ele_buffer_len)
float BMO_slot_float_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
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_initf(BMesh *bm, BMOperator *op, int flag, const char *fmt,...)
void * BMO_iter_step(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_selected_remap(BMesh *bm, BMOpSlot *slot_vert_map, BMOpSlot *slot_edge_map, BMOpSlot *slot_face_map, bool check_select)
void BMO_slot_float_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, float f)
void * BMO_iter_map_value_ptr(BMOIter *iter)
const int BMO_OPSLOT_TYPEINFO[BMO_OP_SLOT_TOTAL_TYPES]
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.
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.
BLI_INLINE void _bmo_elem_flag_disable(BMesh *bm, BMFlagLayer *oflags, short oflag)
void BMO_op_flag_enable(BMesh *bm, BMOperator *op, int op_flag)
void * BMO_slot_buffer_get_single(BMOpSlot *slot)
void BMO_push(BMesh *bm, BMOperator *op)
BMESH OPSTACK PUSH.
void BMO_op_flag_disable(BMesh *bm, BMOperator *op, int op_flag)
void BMO_slot_map_insert(BMOperator *op, BMOpSlot *slot, const void *element, const void *data)
bool BMO_iter_map_value_bool(BMOIter *iter)
void * BMO_slot_ptr_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
@ BMO_OP_SLOT_SUBTYPE_PTR_STRUCT
@ BMO_OP_SLOT_SUBTYPE_PTR_SCENE
@ BMO_OP_SLOT_SUBTYPE_PTR_OBJECT
@ BMO_OP_SLOT_SUBTYPE_PTR_BMESH
void BMO_slot_mat_set(BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const float *mat, int size)
ATTR_WARN_UNUSED_RESULT const BMFlagLayer * oflags
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_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)
BMesh const char void * data
void BMO_slot_vec_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, float r_vec[3])
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_vec_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const float vec[3])
void BMO_slot_bool_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, bool i)
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)
bool BMO_op_callf(BMesh *bm, int flag, const char *fmt,...)
@ BMO_OP_SLOT_SUBTYPE_ELEM_EDGE
@ BMO_OP_SLOT_SUBTYPE_ELEM_IS_SINGLE
@ BMO_OP_SLOT_SUBTYPE_ELEM_FACE
@ BMO_OP_SLOT_SUBTYPE_ELEM_VERT
float BMO_iter_map_value_float(BMOIter *iter)
void BMO_slot_mat4_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, float r_mat[4][4])
void BMO_slot_int_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, int i)
BLI_INLINE void _bmo_elem_flag_toggle(BMesh *bm, BMFlagLayer *oflags, short oflag)
BLI_INLINE bool _bmo_elem_flag_test_bool(BMesh *bm, const BMFlagLayer *oflags, short oflag)
BMOpSlot * BMO_slot_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *identifier)
BMESH OPSTACK GET SLOT.
bool BMO_slot_bool_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
BLI_INLINE void _bmo_elem_flag_set(BMesh *bm, BMFlagLayer *oflags, short oflag, int val)
int BMO_opcode_from_opname(const char *opname)
bool BMO_op_vinitf(BMesh *bm, BMOperator *op, int flag, const char *fmt, va_list vlist)
void * BMO_slot_buffer_alloc(BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, int len)
void ** BMO_iter_map_value_p(BMOIter *iter)
@ BMO_OPTYPE_FLAG_INVALIDATE_CLNOR_ALL
@ BMO_OPTYPE_FLAG_SELECT_VALIDATE
@ BMO_OPTYPE_FLAG_UNTAN_MULTIRES
int BMO_mesh_disabled_flag_count(BMesh *bm, char htype, short oflag)
void BMO_slot_buffer_from_single(BMOperator *op, BMOpSlot *slot, BMHeader *ele)
int BMO_slot_map_len(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
void BMO_slot_mat3_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, float r_mat[3][3])
void BMO_op_init(BMesh *bm, BMOperator *op, int flag, const char *opname)
BMESH OPSTACK INIT OP.
bool BMO_op_vcallf(BMesh *bm, int flag, const char *fmt, va_list list)
void BMO_op_finish(BMesh *bm, BMOperator *op)
BMESH OPSTACK FINISH OP.
ATTR_WARN_UNUSED_RESULT const void * element
BLI_INLINE BMFlagLayer * BMO_elem_flag_from_header(BMHeader *ele_head)
ATTR_WARN_UNUSED_RESULT const BMFlagLayer const short oflag
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.
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_enable(BMesh *bm, BMFlagLayer *oflags, short oflag)
void BMO_mesh_flag_disable_all(BMesh *bm, BMOperator *op, char htype, short oflag)
void BMO_pop(BMesh *bm)
BMESH OPSTACK POP.
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)
void * BMO_slot_buffer_get_first(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
bool BMO_slot_exists(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *identifier)
BMESH OPSTACK HAS SLOT.
void * BMO_iter_new(BMOIter *iter, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, char restrictmask)
New Iterator.
char name[MAX_SLOTNAME]
eBMOpSlotSubType_Union subtype
BMOSlotType slot_types_out[BMO_OP_MAX_SLOTS]
void(*) exec(BMesh *bm, BMOperator *op)
BMOSlotType slot_types_in[BMO_OP_MAX_SLOTS]
void(*) init(BMOperator *op)
eBMOpSlotSubType_Union slot_subtype
struct BMOpSlot slots_in[BMO_OP_MAX_SLOTS]
struct BMOpSlot slots_out[BMO_OP_MAX_SLOTS]
struct MemArena * arena
void(*) exec(BMesh *bm, struct BMOperator *op)
struct blender::BMOpSlot::@376352321363166111241172004263244043165250166277::@022214307230142241003303273265356120355003311226 enum_data