Blender V5.0
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_ghash.h"
12#include "BLI_utildefines.h"
13
14#include <cstdarg>
15
16#include "bmesh_class.hh"
17
55
56struct GHashIterator;
57
59{
60 switch (ele_head->htype) {
61 case BM_VERT:
62 return ((BMVert_OFlag *)ele_head)->oflags;
63 case BM_EDGE:
64 return ((BMEdge_OFlag *)ele_head)->oflags;
65 default:
66 return ((BMFace_OFlag *)ele_head)->oflags;
67 }
68}
69
70#define BMO_elem_flag_test(bm, ele, oflag) \
71 _bmo_elem_flag_test(bm, BMO_elem_flag_from_header(&(ele)->head), oflag)
72#define BMO_elem_flag_test_bool(bm, ele, oflag) \
73 _bmo_elem_flag_test_bool(bm, BMO_elem_flag_from_header(&(ele)->head), oflag)
74#define BMO_elem_flag_enable(bm, ele, oflag) \
75 _bmo_elem_flag_enable( \
76 bm, (BM_CHECK_TYPE_ELEM_NONCONST(ele), BMO_elem_flag_from_header(&(ele)->head)), oflag)
77#define BMO_elem_flag_disable(bm, ele, oflag) \
78 _bmo_elem_flag_disable( \
79 bm, (BM_CHECK_TYPE_ELEM_NONCONST(ele), BMO_elem_flag_from_header(&(ele)->head)), oflag)
80#define BMO_elem_flag_set(bm, ele, oflag, val) \
81 _bmo_elem_flag_set(bm, \
82 (BM_CHECK_TYPE_ELEM_NONCONST(ele), BMO_elem_flag_from_header(&(ele)->head)), \
83 oflag, \
84 val)
85#define BMO_elem_flag_toggle(bm, ele, oflag) \
86 _bmo_elem_flag_toggle( \
87 bm, (BM_CHECK_TYPE_ELEM_NONCONST(ele), BMO_elem_flag_from_header(&(ele)->head)), oflag)
88
89/* take care not to instantiate args multiple times */
90#ifdef __GNUC___
91# define _BMO_CAST_V_CONST(e) \
92 ({ \
93 typeof(e) _e = e; \
94 (BM_CHECK_TYPE_VERT(_e), \
95 BLI_assert(((const BMHeader *)_e)->htype == BM_VERT), \
96 (const BMVert_OFlag *)_e); \
97 })
98# define _BMO_CAST_E_CONST(e) \
99 ({ \
100 typeof(e) _e = e; \
101 (BM_CHECK_TYPE_EDGE(_e), \
102 BLI_assert(((const BMHeader *)_e)->htype == BM_EDGE), \
103 (const BMEdge_OFlag *)_e); \
104 })
105# define _BMO_CAST_F_CONST(e) \
106 ({ \
107 typeof(e) _e = e; \
108 (BM_CHECK_TYPE_FACE(_e), \
109 BLI_assert(((const BMHeader *)_e)->htype == BM_FACE), \
110 (const BMFace_OFlag *)_e); \
111 })
112# define _BMO_CAST_V(e) \
113 ({ \
114 typeof(e) _e = e; \
115 (BM_CHECK_TYPE_VERT_NONCONST(_e), \
116 BLI_assert(((BMHeader *)_e)->htype == BM_VERT), \
117 (BMVert_OFlag *)_e); \
118 })
119# define _BMO_CAST_E(e) \
120 ({ \
121 typeof(e) _e = e; \
122 (BM_CHECK_TYPE_EDGE_NONCONST(_e), \
123 BLI_assert(((BMHeader *)_e)->htype == BM_EDGE), \
124 (BMEdge_OFlag *)_e); \
125 })
126# define _BMO_CAST_F(e) \
127 ({ \
128 typeof(e) _e = e; \
129 (BM_CHECK_TYPE_FACE_NONCONST(_e), \
130 BLI_assert(((BMHeader *)_e)->htype == BM_FACE), \
131 (BMFace_OFlag *)_e); \
132 })
133#else
134# define _BMO_CAST_V_CONST(e) (BM_CHECK_TYPE_VERT(e), (const BMVert_OFlag *)e)
135# define _BMO_CAST_E_CONST(e) (BM_CHECK_TYPE_EDGE(e), (const BMEdge_OFlag *)e)
136# define _BMO_CAST_F_CONST(e) (BM_CHECK_TYPE_FACE(e), (const BMFace_OFlag *)e)
137# define _BMO_CAST_V(e) (BM_CHECK_TYPE_VERT_NONCONST(e), (BMVert_OFlag *)e)
138# define _BMO_CAST_E(e) (BM_CHECK_TYPE_EDGE_NONCONST(e), (BMEdge_OFlag *)e)
139# define _BMO_CAST_F(e) (BM_CHECK_TYPE_FACE_NONCONST(e), (BMFace_OFlag *)e)
140#endif
141
142#define BMO_vert_flag_test(bm, e, oflag) \
143 _bmo_elem_flag_test(bm, _BMO_CAST_V_CONST(e)->oflags, oflag)
144#define BMO_vert_flag_test_bool(bm, e, oflag) \
145 _bmo_elem_flag_test_bool(bm, _BMO_CAST_V_CONST(e)->oflags, oflag)
146#define BMO_vert_flag_enable(bm, e, oflag) _bmo_elem_flag_enable(bm, _BMO_CAST_V(e)->oflags, oflag)
147#define BMO_vert_flag_disable(bm, e, oflag) \
148 _bmo_elem_flag_disable(bm, _BMO_CAST_V(e)->oflags, oflag)
149#define BMO_vert_flag_set(bm, e, oflag, val) \
150 _bmo_elem_flag_set(bm, _BMO_CAST_V(e)->oflags, oflag, val)
151#define BMO_vert_flag_toggle(bm, e, oflag) _bmo_elem_flag_toggle(bm, _BMO_CAST_V(e)->oflags, oflag)
152
153#define BMO_edge_flag_test(bm, e, oflag) \
154 _bmo_elem_flag_test(bm, _BMO_CAST_E_CONST(e)->oflags, oflag)
155#define BMO_edge_flag_test_bool(bm, e, oflag) \
156 _bmo_elem_flag_test_bool(bm, _BMO_CAST_E_CONST(e)->oflags, oflag)
157#define BMO_edge_flag_enable(bm, e, oflag) _bmo_elem_flag_enable(bm, _BMO_CAST_E(e)->oflags, oflag)
158#define BMO_edge_flag_disable(bm, e, oflag) \
159 _bmo_elem_flag_disable(bm, _BMO_CAST_E(e)->oflags, oflag)
160#define BMO_edge_flag_set(bm, e, oflag, val) \
161 _bmo_elem_flag_set(bm, _BMO_CAST_E(e)->oflags, oflag, val)
162#define BMO_edge_flag_toggle(bm, e, oflag) _bmo_elem_flag_toggle(bm, _BMO_CAST_E(e)->oflags, oflag)
163
164#define BMO_face_flag_test(bm, e, oflag) \
165 _bmo_elem_flag_test(bm, _BMO_CAST_F_CONST(e)->oflags, oflag)
166#define BMO_face_flag_test_bool(bm, e, oflag) \
167 _bmo_elem_flag_test_bool(bm, _BMO_CAST_F_CONST(e)->oflags, oflag)
168#define BMO_face_flag_enable(bm, e, oflag) _bmo_elem_flag_enable(bm, _BMO_CAST_F(e)->oflags, oflag)
169#define BMO_face_flag_disable(bm, e, oflag) \
170 _bmo_elem_flag_disable(bm, _BMO_CAST_F(e)->oflags, oflag)
171#define BMO_face_flag_set(bm, e, oflag, val) \
172 _bmo_elem_flag_set(bm, _BMO_CAST_F(e)->oflags, oflag, val)
173#define BMO_face_flag_toggle(bm, e, oflag) _bmo_elem_flag_toggle(bm, _BMO_CAST_F(e)->oflags, oflag)
174
181
182/* slot type arrays are terminated by the last member
183 * having a slot type of 0 */
185 /* BMO_OP_SLOT_SENTINEL = 0, */
189
190 /* normally store pointers to object, scene,
191 * _never_ store arrays corresponding to mesh elements with this */
192 BMO_OP_SLOT_PTR = 4, /* requires subtype BMO_OP_SLOT_SUBTYPE_PTR_xxx */
195
196 /* after BMO_OP_SLOT_VEC, everything is dynamically allocated arrays.
197 * We leave a space in the identifiers for future growth.
198 *
199 * it's very important this remain a power of two */
200 BMO_OP_SLOT_ELEMENT_BUF = 9, /* list of verts/edges/faces */
201 BMO_OP_SLOT_MAPPING = 10 /* simple hash map, requires subtype BMO_OP_SLOT_SUBTYPE_MAP_xxx */
202};
203#define BMO_OP_SLOT_TOTAL_TYPES 11
204
205/* don't overlap values to avoid confusion */
214
234
241
243 int value;
244 const char *identifier;
245};
246
247/* please ignore all these structures, don't touch them in tool code, except
248 * for when your defining an operator with BMOpDefine. */
249
250struct BMOpSlot {
251 const char *slot_name; /* pointer to BMOpDefine.slot_args */
254
255 int len;
256 // int flag; /* UNUSED */
257 // int index; /* index within slot array */ /* UNUSED */
258 union {
259 int i;
260 float f;
261 void *p;
262 float vec[3];
263 void **buf;
265 struct {
267 int _i;
271};
272
273/* mainly for use outside bmesh internal code */
274#define BMO_SLOT_AS_BOOL(slot) ((slot)->data.i)
275#define BMO_SLOT_AS_INT(slot) ((slot)->data.i)
276#define BMO_SLOT_AS_FLOAT(slot) ((slot)->data.f)
277#define BMO_SLOT_AS_VECTOR(slot) ((slot)->data.vec)
278#define BMO_SLOT_AS_MATRIX(slot) ((float (*)[4])((slot)->data.p))
279#define BMO_SLOT_AS_BUFFER(slot) ((slot)->data.buf)
280#define BMO_SLOT_AS_GHASH(slot) ((slot)->data.ghash)
281
282#define BMO_ASSERT_SLOT_IN_OP(slot, op) \
283 BLI_assert(((slot >= (op)->slots_in) && (slot < &(op)->slots_in[BMO_OP_MAX_SLOTS])) || \
284 ((slot >= (op)->slots_out) && (slot < &(op)->slots_out[BMO_OP_MAX_SLOTS])))
285
286/* Limit hit, so expanded for bevel operator. Compiler complains if limit is hit. */
287#define BMO_OP_MAX_SLOTS 21
288
289/* BMOpDefine->type_flag */
300
304 void (*exec)(BMesh *bm, struct BMOperator *op);
306 int type;
308 int flag; /* runtime options */
309};
310
311enum {
313};
314
315#define BMO_FLAG_DEFAULTS BMO_FLAG_RESPECT_HIDE
316
317#define MAX_SLOTNAME 32
318
325
338
339/* -------------------------------------------------------------------- */
345
351void BMO_op_init(BMesh *bm, BMOperator *op, int flag, const char *opname);
352
362void BMO_op_exec(BMesh *bm, BMOperator *op);
363
371void BMO_op_finish(BMesh *bm, BMOperator *op);
372
377int BMO_mesh_enabled_flag_count(BMesh *bm, char htype, short oflag);
378
383int BMO_mesh_disabled_flag_count(BMesh *bm, char htype, short oflag);
384
390void BMO_push(BMesh *bm, BMOperator *op);
398void BMO_pop(BMesh *bm);
399
401
402/* -------------------------------------------------------------------- */
458
460bool BMO_op_callf(BMesh *bm, int flag, const char *fmt, ...);
461
467bool BMO_op_initf(BMesh *bm, BMOperator *op, int flag, const char *fmt, ...);
468
473bool BMO_op_vinitf(BMesh *bm, BMOperator *op, int flag, const char *fmt, va_list vlist);
474
476
477/* -------------------------------------------------------------------- */
480
486bool BMO_slot_exists(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *identifier);
487
488/* get a pointer to a slot. this may be removed layer on from the public API. */
494BMOpSlot *BMO_slot_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *identifier);
495
496/* copies the data of a slot from one operator to another. src and dst are the
497 * source/destination slot codes, respectively. */
498#define BMO_slot_copy(op_src, slots_src, slot_name_src, op_dst, slots_dst, slot_name_dst) \
499 _bmo_slot_copy( \
500 (op_src)->slots_src, slot_name_src, (op_dst)->slots_dst, slot_name_dst, (op_dst)->arena)
501
508void _bmo_slot_copy(BMOpSlot slot_args_src[BMO_OP_MAX_SLOTS],
509 const char *slot_name_src,
510 BMOpSlot slot_args_dst[BMO_OP_MAX_SLOTS],
511 const char *slot_name_dst,
512 struct MemArena *arena_dst);
513
515
517enum {
523 /* A version of 'DEL_FACES' that keeps edges on face boundaries,
524 * allowing the surrounding edge-loop to be kept from removed face regions. */
527};
528
538
547
548void BMO_op_flag_enable(BMesh *bm, BMOperator *op, int op_flag);
549void BMO_op_flag_disable(BMesh *bm, BMOperator *op, int op_flag);
550
551/* -------------------------------------------------------------------- */
554
555void BMO_slot_float_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, float f);
556float BMO_slot_float_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name);
557void BMO_slot_int_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, int i);
558int BMO_slot_int_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name);
559void BMO_slot_bool_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, bool i);
560bool BMO_slot_bool_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name);
564void *BMO_slot_as_arrayN(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, int *len);
565
572void BMO_slot_ptr_set(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, void *p);
573void *BMO_slot_ptr_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name);
575 const char *slot_name,
576 const float vec[3]);
577void BMO_slot_vec_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, float r_vec[3]);
578
586 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
587 const char *slot_name,
588 const float *mat,
589 int size);
591 const char *slot_name,
592 float r_mat[4][4]);
594 const char *slot_name,
595 float r_mat[3][3]);
596
598
599void BMO_mesh_flag_disable_all(BMesh *bm, BMOperator *op, char htype, short oflag);
600
602 BMOpSlot *slot_vert_map,
603 BMOpSlot *slot_edge_map,
604 BMOpSlot *slot_face_map,
605 bool check_select);
606
610#define BMO_slot_buffer_append( \
611 op_src, slots_src, slot_name_src, op_dst, slots_dst, slot_name_dst) \
612 _bmo_slot_buffer_append( \
613 (op_src)->slots_src, slot_name_src, (op_dst)->slots_dst, slot_name_dst, (op_dst)->arena)
618 const char *slot_name_dst,
619 BMOpSlot slot_args_src[BMO_OP_MAX_SLOTS],
620 const char *slot_name_src,
621 struct MemArena *arena_dst);
622
627 BMOperator *op,
628 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
629 const char *slot_name,
630 char htype,
631 short oflag);
632
637 BMOperator *op,
638 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
639 const char *slot_name,
640 char htype,
641 short oflag);
642
649 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
650 const char *slot_name,
651 char htype,
652 short oflag);
659 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
660 const char *slot_name,
661 char htype,
662 short oflag);
663
671 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
672 const char *slot_name,
673 char htype,
674 char hflag,
675 bool do_flush);
683 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
684 const char *slot_name,
685 char htype,
686 char hflag,
687 bool do_flush);
688
694 BMOperator *op,
695 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
696 const char *slot_name,
697 char htype,
698 char hflag);
704 BMOperator *op,
705 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
706 const char *slot_name,
707 char htype,
708 char hflag);
709
711 BMOpSlot *slot,
712 BMHeader **ele_buffer,
713 int ele_buffer_len);
714
717
719int BMO_slot_buffer_len(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name);
721int BMO_slot_map_len(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name);
722
727void BMO_slot_map_insert(BMOperator *op, BMOpSlot *slot, const void *element, const void *data);
728
734 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
735 const char *slot_name,
736 char htype,
737 short oflag);
738
740 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
741 const char *slot_name,
742 int len);
743
750 BMOperator *op,
751 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
752 const char *slot_name,
753 char htype);
754
789
790/* contents of this structure are private,
791 * don't directly access. */
792struct BMOIter {
794 int cur; // for arrays
796 void **val;
799};
800
801void *BMO_slot_buffer_get_first(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name);
802
809void *BMO_iter_new(BMOIter *iter,
810 BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
811 const char *slot_name,
812 char restrictmask);
813void *BMO_iter_step(BMOIter *iter);
814
819void **BMO_iter_map_value_p(BMOIter *iter);
821
825
826#define BMO_ITER(ele, iter, slot_args, slot_name, restrict_flag) \
827 for (BM_CHECK_TYPE_ELEM_ASSIGN(ele) = BMO_iter_new(iter, slot_args, slot_name, restrict_flag); \
828 ele; \
829 BM_CHECK_TYPE_ELEM_ASSIGN(ele) = BMO_iter_step(iter))
830
831#define BMO_ITER_INDEX(ele, iter, slot_args, slot_name, restrict_flag, i_) \
832 for (BM_CHECK_TYPE_ELEM_ASSIGN(ele) = BMO_iter_new(iter, slot_args, slot_name, restrict_flag), \
833 i_ = 0; \
834 ele; \
835 BM_CHECK_TYPE_ELEM_ASSIGN(ele) = BMO_iter_step(iter), i_++)
836
837/* operator slot type information - size of one element of the type given. */
839
840int BMO_opcode_from_opname(const char *opname);
#define BLI_INLINE
#define ENUM_OPERATORS(_type, _max)
BMesh const char void * data
BMesh * bm
#define BM_FACE
#define BM_EDGE
#define BM_VERT
void * BMO_slot_buffer_alloc(BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, int len)
eBMOpSlotSubType_Ptr
@ 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])
@ DEL_ONLYTAGGED
@ DEL_FACES_KEEP_BOUNDARY
@ DEL_EDGESFACES
@ DEL_ONLYFACES
BMO_SymmDirection
@ 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)
eBMOpSlotSubType_Elem
@ 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
@ BMO_OP_SLOT_PTR
@ BMO_OP_SLOT_BOOL
@ BMO_OP_SLOT_FLT
@ BMO_OP_SLOT_INT
@ BMO_OP_SLOT_VEC
@ BMO_OP_SLOT_MAPPING
@ BMO_OP_SLOT_MAT
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)
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)
#define MAX_SLOTNAME
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.
eBMOpSlotSubType_Map
@ 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)
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)
eBMOpSlotSubType_Int
@ 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)
#define BMO_OP_MAX_SLOTS
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.
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.
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)
@ BMO_OPTYPE_FLAG_NOP
@ 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.
@ BMO_FLAG_RESPECT_HIDE
bool BMO_slot_bool_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
@ BMO_DELIM_NORMAL
@ BMO_DELIM_MATERIAL
@ BMO_DELIM_SEAM
@ BMO_DELIM_SHARP
@ BMO_DELIM_UV
void * BMO_iter_step(BMOIter *iter)
ATTR_WARN_UNUSED_RESULT const void * element
ATTR_WARN_UNUSED_RESULT const BMFlagLayer const short oflag
ATTR_WARN_UNUSED_RESULT const BMFlagLayer * oflags
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition btDbvt.cpp:52
BMOpSlot * slot
GHashIterator giter
BMO_FlagSet * enum_flags
eBMOpSlotSubType_Union subtype
eBMOpSlotType type
char name[MAX_SLOTNAME]
const char * identifier
BMOpTypeFlag type_flag
const char * opname
BMOSlotType slot_types_in[BMO_OP_MAX_SLOTS]
BMOSlotType slot_types_out[BMO_OP_MAX_SLOTS]
void(* exec)(BMesh *bm, BMOperator *op)
void(* init)(BMOperator *op)
eBMOpSlotSubType_Union slot_subtype
eBMOpSlotType slot_type
BMO_FlagSet * flags
struct BMOpSlot::@313121210037300127305053354046356312170117023254::@263061076130337244124145337307265057223360175210 enum_data
const char * slot_name
struct BMOpSlot slots_out[BMO_OP_MAX_SLOTS]
struct MemArena * arena
struct BMOpSlot slots_in[BMO_OP_MAX_SLOTS]
void(* exec)(BMesh *bm, struct BMOperator *op)
BMOpTypeFlag type_flag
i
Definition text_draw.cc:230
eBMOpSlotSubType_Ptr ptr
eBMOpSlotSubType_Int intg
eBMOpSlotSubType_Elem elem
eBMOpSlotSubType_Map map
uint len
uint8_t flag
Definition wm_window.cc:145