Blender  V2.93
Classes | Macros | Typedefs | Enumerations | Functions | Variables
bmesh_operator_api.h File Reference
#include "BLI_ghash.h"
#include <stdarg.h>

Go to the source code of this file.

Classes

union  eBMOpSlotSubType_Union
 
struct  BMO_FlagSet
 
struct  BMOpSlot
 
struct  BMOperator
 
struct  BMOSlotType
 
struct  BMOpDefine
 
struct  BMOIter
 

Macros

#define BMO_elem_flag_test(bm, ele, oflag)    _bmo_elem_flag_test(bm, BMO_elem_flag_from_header(&(ele)->head), oflag)
 
#define BMO_elem_flag_test_bool(bm, ele, oflag)    _bmo_elem_flag_test_bool(bm, BMO_elem_flag_from_header(&(ele)->head), oflag)
 
#define BMO_elem_flag_enable(bm, ele, oflag)
 
#define BMO_elem_flag_disable(bm, ele, oflag)
 
#define BMO_elem_flag_set(bm, ele, oflag, val)
 
#define BMO_elem_flag_toggle(bm, ele, oflag)
 
#define _BMO_CAST_V_CONST(e)   (BM_CHECK_TYPE_VERT(e), (const BMVert_OFlag *)e)
 
#define _BMO_CAST_E_CONST(e)   (BM_CHECK_TYPE_EDGE(e), (const BMEdge_OFlag *)e)
 
#define _BMO_CAST_F_CONST(e)   (BM_CHECK_TYPE_FACE(e), (const BMFace_OFlag *)e)
 
#define _BMO_CAST_V(e)   (BM_CHECK_TYPE_VERT_NONCONST(e), (BMVert_OFlag *)e)
 
#define _BMO_CAST_E(e)   (BM_CHECK_TYPE_EDGE_NONCONST(e), (BMEdge_OFlag *)e)
 
#define _BMO_CAST_F(e)   (BM_CHECK_TYPE_FACE_NONCONST(e), (BMFace_OFlag *)e)
 
#define BMO_vert_flag_test(bm, e, oflag)    _bmo_elem_flag_test(bm, _BMO_CAST_V_CONST(e)->oflags, oflag)
 
#define BMO_vert_flag_test_bool(bm, e, oflag)    _bmo_elem_flag_test_bool(bm, _BMO_CAST_V_CONST(e)->oflags, oflag)
 
#define BMO_vert_flag_enable(bm, e, oflag)   _bmo_elem_flag_enable(bm, _BMO_CAST_V(e)->oflags, oflag)
 
#define BMO_vert_flag_disable(bm, e, oflag)    _bmo_elem_flag_disable(bm, _BMO_CAST_V(e)->oflags, oflag)
 
#define BMO_vert_flag_set(bm, e, oflag, val)    _bmo_elem_flag_set(bm, _BMO_CAST_V(e)->oflags, oflag, val)
 
#define BMO_vert_flag_toggle(bm, e, oflag)   _bmo_elem_flag_toggle(bm, _BMO_CAST_V(e)->oflags, oflag)
 
#define BMO_edge_flag_test(bm, e, oflag)    _bmo_elem_flag_test(bm, _BMO_CAST_E_CONST(e)->oflags, oflag)
 
#define BMO_edge_flag_test_bool(bm, e, oflag)    _bmo_elem_flag_test_bool(bm, _BMO_CAST_E_CONST(e)->oflags, oflag)
 
#define BMO_edge_flag_enable(bm, e, oflag)   _bmo_elem_flag_enable(bm, _BMO_CAST_E(e)->oflags, oflag)
 
#define BMO_edge_flag_disable(bm, e, oflag)    _bmo_elem_flag_disable(bm, _BMO_CAST_E(e)->oflags, oflag)
 
#define BMO_edge_flag_set(bm, e, oflag, val)    _bmo_elem_flag_set(bm, _BMO_CAST_E(e)->oflags, oflag, val)
 
#define BMO_edge_flag_toggle(bm, e, oflag)   _bmo_elem_flag_toggle(bm, _BMO_CAST_E(e)->oflags, oflag)
 
#define BMO_face_flag_test(bm, e, oflag)    _bmo_elem_flag_test(bm, _BMO_CAST_F_CONST(e)->oflags, oflag)
 
#define BMO_face_flag_test_bool(bm, e, oflag)    _bmo_elem_flag_test_bool(bm, _BMO_CAST_F_CONST(e)->oflags, oflag)
 
#define BMO_face_flag_enable(bm, e, oflag)   _bmo_elem_flag_enable(bm, _BMO_CAST_F(e)->oflags, oflag)
 
#define BMO_face_flag_disable(bm, e, oflag)    _bmo_elem_flag_disable(bm, _BMO_CAST_F(e)->oflags, oflag)
 
#define BMO_face_flag_set(bm, e, oflag, val)    _bmo_elem_flag_set(bm, _BMO_CAST_F(e)->oflags, oflag, val)
 
#define BMO_face_flag_toggle(bm, e, oflag)   _bmo_elem_flag_toggle(bm, _BMO_CAST_F(e)->oflags, oflag)
 
#define BMO_OP_SLOT_TOTAL_TYPES   11
 
#define BMO_SLOT_AS_BOOL(slot)   ((slot)->data.i)
 
#define BMO_SLOT_AS_INT(slot)   ((slot)->data.i)
 
#define BMO_SLOT_AS_FLOAT(slot)   ((slot)->data.f)
 
#define BMO_SLOT_AS_VECTOR(slot)   ((slot)->data.vec)
 
#define BMO_SLOT_AS_MATRIX(slot)   ((float(*)[4])((slot)->data.p))
 
#define BMO_SLOT_AS_BUFFER(slot)   ((slot)->data.buf)
 
#define BMO_SLOT_AS_GHASH(slot)   ((slot)->data.ghash)
 
#define BMO_ASSERT_SLOT_IN_OP(slot, op)
 
#define BMO_OP_MAX_SLOTS   21
 
#define BMO_FLAG_DEFAULTS   BMO_FLAG_RESPECT_HIDE
 
#define MAX_SLOTNAME   32
 
#define BMO_slot_copy(op_src, slots_src, slot_name_src, op_dst, slots_dst, slot_name_dst)
 
#define BMO_slot_buffer_append(op_src, slots_src, slot_name_src, op_dst, slots_dst, slot_name_dst)
 
#define BMO_ITER(ele, iter, slot_args, slot_name, restrict_flag)
 
#define BMO_ITER_INDEX(ele, iter, slot_args, slot_name, restrict_flag, i_)
 

Typedefs

typedef enum eBMOpSlotType eBMOpSlotType
 
typedef enum eBMOpSlotSubType_Elem eBMOpSlotSubType_Elem
 
typedef enum eBMOpSlotSubType_Map eBMOpSlotSubType_Map
 
typedef enum eBMOpSlotSubType_Ptr eBMOpSlotSubType_Ptr
 
typedef enum eBMOpSlotSubType_Int eBMOpSlotSubType_Int
 
typedef union eBMOpSlotSubType_Union eBMOpSlotSubType_Union
 
typedef struct BMO_FlagSet BMO_FlagSet
 
typedef struct BMOpSlot BMOpSlot
 
typedef struct BMOperator BMOperator
 
typedef struct BMOSlotType BMOSlotType
 
typedef struct BMOpDefine BMOpDefine
 
typedef struct BMOIter BMOIter
 

Enumerations

enum  eBMOpSlotType {
  BMO_OP_SLOT_BOOL = 1 , BMO_OP_SLOT_INT = 2 , BMO_OP_SLOT_FLT = 3 , BMO_OP_SLOT_PTR = 4 ,
  BMO_OP_SLOT_MAT = 5 , BMO_OP_SLOT_VEC = 8 , BMO_OP_SLOT_ELEMENT_BUF = 9 , BMO_OP_SLOT_MAPPING = 10
}
 
enum  eBMOpSlotSubType_Elem { BMO_OP_SLOT_SUBTYPE_ELEM_VERT = BM_VERT , BMO_OP_SLOT_SUBTYPE_ELEM_EDGE = BM_EDGE , BMO_OP_SLOT_SUBTYPE_ELEM_FACE = BM_FACE , BMO_OP_SLOT_SUBTYPE_ELEM_IS_SINGLE = (BM_FACE << 1) }
 
enum  eBMOpSlotSubType_Map {
  BMO_OP_SLOT_SUBTYPE_MAP_EMPTY = 64 , BMO_OP_SLOT_SUBTYPE_MAP_ELEM = 65 , BMO_OP_SLOT_SUBTYPE_MAP_FLT = 66 , BMO_OP_SLOT_SUBTYPE_MAP_INT = 67 ,
  BMO_OP_SLOT_SUBTYPE_MAP_BOOL = 68 , BMO_OP_SLOT_SUBTYPE_MAP_INTERNAL = 69
}
 
enum  eBMOpSlotSubType_Ptr {
  BMO_OP_SLOT_SUBTYPE_PTR_BMESH = 100 , BMO_OP_SLOT_SUBTYPE_PTR_SCENE = 101 , BMO_OP_SLOT_SUBTYPE_PTR_OBJECT = 102 , BMO_OP_SLOT_SUBTYPE_PTR_MESH = 103 ,
  BMO_OP_SLOT_SUBTYPE_PTR_STRUCT = 104
}
 
enum  eBMOpSlotSubType_Int { BMO_OP_SLOT_SUBTYPE_INT_ENUM = 200 , BMO_OP_SLOT_SUBTYPE_INT_FLAG = 201 }
 
enum  BMOpTypeFlag {
  BMO_OPTYPE_FLAG_NOP = 0 , BMO_OPTYPE_FLAG_UNTAN_MULTIRES = (1 << 0) , BMO_OPTYPE_FLAG_NORMALS_CALC = (1 << 1) , BMO_OPTYPE_FLAG_SELECT_FLUSH = (1 << 2) ,
  BMO_OPTYPE_FLAG_SELECT_VALIDATE = (1 << 3) , BMO_OPTYPE_FLAG_INVALIDATE_CLNOR_ALL = (1 << 4)
}
 
enum  { BMO_FLAG_RESPECT_HIDE = 1 }
 
enum  {
  DEL_VERTS = 1 , DEL_EDGES , DEL_ONLYFACES , DEL_EDGESFACES ,
  DEL_FACES , DEL_FACES_KEEP_BOUNDARY , DEL_ONLYTAGGED
}
 
enum  BMO_SymmDirection {
  BMO_SYMMETRIZE_NEGATIVE_X , BMO_SYMMETRIZE_NEGATIVE_Y , BMO_SYMMETRIZE_NEGATIVE_Z , BMO_SYMMETRIZE_POSITIVE_X ,
  BMO_SYMMETRIZE_POSITIVE_Y , BMO_SYMMETRIZE_POSITIVE_Z
}
 
enum  BMO_Delimit {
  BMO_DELIM_NORMAL = 1 << 0 , BMO_DELIM_MATERIAL = 1 << 1 , BMO_DELIM_SEAM = 1 << 2 , BMO_DELIM_SHARP = 1 << 3 ,
  BMO_DELIM_UV = 1 << 4
}
 

Functions

BLI_INLINE BMFlagLayerBMO_elem_flag_from_header (BMHeader *ele_head)
 
BLI_INLINE short _bmo_elem_flag_test (BMesh *bm, const BMFlagLayer *oflags, const short oflag)
 
BLI_INLINE bool _bmo_elem_flag_test_bool (BMesh *bm, const BMFlagLayer *oflags, const short oflag)
 
BLI_INLINE void _bmo_elem_flag_enable (BMesh *bm, BMFlagLayer *oflags, const short oflag)
 
BLI_INLINE void _bmo_elem_flag_disable (BMesh *bm, BMFlagLayer *oflags, const short oflag)
 
BLI_INLINE void _bmo_elem_flag_set (BMesh *bm, BMFlagLayer *oflags, const short oflag, int val)
 
BLI_INLINE void _bmo_elem_flag_toggle (BMesh *bm, BMFlagLayer *oflags, const short oflag)
 
void BMO_op_init (BMesh *bm, BMOperator *op, const int flag, const char *opname)
 BMESH OPSTACK INIT OP. More...
 
void BMO_op_exec (BMesh *bm, BMOperator *op)
 BMESH OPSTACK EXEC OP. More...
 
void BMO_op_finish (BMesh *bm, BMOperator *op)
 BMESH OPSTACK FINISH OP. More...
 
int BMO_mesh_enabled_flag_count (BMesh *bm, const char htype, const short oflag)
 
int BMO_mesh_disabled_flag_count (BMesh *bm, const char htype, const short oflag)
 
void BMO_push (BMesh *bm, BMOperator *op)
 
void BMO_pop (BMesh *bm)
 BMESH OPSTACK POP. More...
 
bool BMO_op_callf (BMesh *bm, const int flag, const char *fmt,...)
 
bool BMO_op_initf (BMesh *bm, BMOperator *op, const int flag, const char *fmt,...)
 
bool BMO_op_vinitf (BMesh *bm, BMOperator *op, const int flag, const char *fmt, va_list vlist)
 Format Strings for BMOperator Initialization. More...
 
bool BMO_slot_exists (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *identifier)
 BMESH OPSTACK HAS SLOT. More...
 
BMOpSlotBMO_slot_get (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *identifier)
 BMESH OPSTACK GET SLOT. More...
 
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. More...
 
void BMO_op_flag_enable (BMesh *bm, BMOperator *op, const int op_flag)
 
void BMO_op_flag_disable (BMesh *bm, BMOperator *op, const int op_flag)
 
void BMO_slot_float_set (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const float f)
 
float BMO_slot_float_get (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
 
void BMO_slot_int_set (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const int i)
 
int BMO_slot_int_get (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
 
void BMO_slot_bool_set (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const bool i)
 
bool BMO_slot_bool_get (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)
 
void BMO_slot_ptr_set (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, void *p)
 
void * BMO_slot_ptr_get (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
 
void BMO_slot_vec_set (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const float vec[3])
 
void BMO_slot_vec_get (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, float r_vec[3])
 
void BMO_slot_mat_set (BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const float *mat, int size)
 
void BMO_slot_mat4_get (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, float r_mat[4][4])
 
void BMO_slot_mat3_get (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, float r_mat[3][3])
 
void BMO_mesh_flag_disable_all (BMesh *bm, BMOperator *op, const char htype, const short oflag)
 
void BMO_mesh_selected_remap (BMesh *bm, BMOpSlot *slot_vert_map, BMOpSlot *slot_edge_map, BMOpSlot *slot_face_map, const bool check_select)
 
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_flag (BMesh *bm, BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const char htype, const short oflag)
 
void BMO_slot_buffer_from_disabled_flag (BMesh *bm, BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const char htype, const short oflag)
 
void BMO_slot_buffer_flag_enable (BMesh *bm, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const char htype, const short oflag)
 BMO_FLAG_BUFFER. More...
 
void BMO_slot_buffer_flag_disable (BMesh *bm, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const char htype, const short oflag)
 BMO_FLAG_BUFFER. More...
 
void BMO_slot_buffer_hflag_enable (BMesh *bm, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const char htype, const char hflag, const bool do_flush)
 BMO_FLAG_BUFFER. More...
 
void BMO_slot_buffer_hflag_disable (BMesh *bm, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const char htype, const char hflag, const bool do_flush)
 BMO_FLAG_BUFFER. More...
 
void BMO_slot_buffer_from_enabled_hflag (BMesh *bm, BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const char htype, const char hflag)
 
void BMO_slot_buffer_from_disabled_hflag (BMesh *bm, BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const char htype, const char hflag)
 
void BMO_slot_buffer_from_array (BMOperator *op, BMOpSlot *slot, BMHeader **ele_buffer, int ele_buffer_len)
 
void BMO_slot_buffer_from_single (BMOperator *op, BMOpSlot *slot, BMHeader *ele)
 
void * BMO_slot_buffer_get_single (BMOpSlot *slot)
 
int BMO_slot_buffer_count (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
 
int BMO_slot_map_count (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
 
void BMO_slot_map_insert (BMOperator *op, BMOpSlot *slot, const void *element, const void *data)
 
void BMO_slot_map_to_flag (BMesh *bm, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const char htype, const short oflag)
 
void * BMO_slot_buffer_alloc (BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const int len)
 
void BMO_slot_buffer_from_all (BMesh *bm, BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const char htype)
 BMO_ALL_TO_SLOT. More...
 
void * BMO_slot_buffer_get_first (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
 
void * BMO_iter_new (BMOIter *iter, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const char restrictmask)
 New Iterator. More...
 
void * BMO_iter_step (BMOIter *iter)
 
void ** BMO_iter_map_value_p (BMOIter *iter)
 
void * BMO_iter_map_value_ptr (BMOIter *iter)
 
float BMO_iter_map_value_float (BMOIter *iter)
 
int BMO_iter_map_value_int (BMOIter *iter)
 
bool BMO_iter_map_value_bool (BMOIter *iter)
 
int BMO_opcode_from_opname (const char *opname)
 

Variables

const int BMO_OPSLOT_TYPEINFO [BMO_OP_SLOT_TOTAL_TYPES]
 

Macro Definition Documentation

◆ _BMO_CAST_E

#define _BMO_CAST_E (   e)    (BM_CHECK_TYPE_EDGE_NONCONST(e), (BMEdge_OFlag *)e)

Definition at line 151 of file bmesh_operator_api.h.

◆ _BMO_CAST_E_CONST

#define _BMO_CAST_E_CONST (   e)    (BM_CHECK_TYPE_EDGE(e), (const BMEdge_OFlag *)e)

Definition at line 148 of file bmesh_operator_api.h.

◆ _BMO_CAST_F

#define _BMO_CAST_F (   e)    (BM_CHECK_TYPE_FACE_NONCONST(e), (BMFace_OFlag *)e)

Definition at line 152 of file bmesh_operator_api.h.

◆ _BMO_CAST_F_CONST

#define _BMO_CAST_F_CONST (   e)    (BM_CHECK_TYPE_FACE(e), (const BMFace_OFlag *)e)

Definition at line 149 of file bmesh_operator_api.h.

◆ _BMO_CAST_V

#define _BMO_CAST_V (   e)    (BM_CHECK_TYPE_VERT_NONCONST(e), (BMVert_OFlag *)e)

Definition at line 150 of file bmesh_operator_api.h.

◆ _BMO_CAST_V_CONST

#define _BMO_CAST_V_CONST (   e)    (BM_CHECK_TYPE_VERT(e), (const BMVert_OFlag *)e)

Definition at line 147 of file bmesh_operator_api.h.

◆ BMO_ASSERT_SLOT_IN_OP

#define BMO_ASSERT_SLOT_IN_OP (   slot,
  op 
)
Value:
BLI_assert(((slot >= (op)->slots_in) && (slot < &(op)->slots_in[BMO_OP_MAX_SLOTS])) || \
((slot >= (op)->slots_out) && (slot < &(op)->slots_out[BMO_OP_MAX_SLOTS])))
#define BLI_assert(a)
Definition: BLI_assert.h:58
#define BMO_OP_MAX_SLOTS

Definition at line 293 of file bmesh_operator_api.h.

◆ BMO_edge_flag_disable

#define BMO_edge_flag_disable (   bm,
  e,
  oflag 
)     _bmo_elem_flag_disable(bm, _BMO_CAST_E(e)->oflags, oflag)

Definition at line 171 of file bmesh_operator_api.h.

◆ BMO_edge_flag_enable

#define BMO_edge_flag_enable (   bm,
  e,
  oflag 
)    _bmo_elem_flag_enable(bm, _BMO_CAST_E(e)->oflags, oflag)

Definition at line 170 of file bmesh_operator_api.h.

◆ BMO_edge_flag_set

#define BMO_edge_flag_set (   bm,
  e,
  oflag,
  val 
)     _bmo_elem_flag_set(bm, _BMO_CAST_E(e)->oflags, oflag, val)

Definition at line 173 of file bmesh_operator_api.h.

◆ BMO_edge_flag_test

#define BMO_edge_flag_test (   bm,
  e,
  oflag 
)     _bmo_elem_flag_test(bm, _BMO_CAST_E_CONST(e)->oflags, oflag)

Definition at line 166 of file bmesh_operator_api.h.

◆ BMO_edge_flag_test_bool

#define BMO_edge_flag_test_bool (   bm,
  e,
  oflag 
)     _bmo_elem_flag_test_bool(bm, _BMO_CAST_E_CONST(e)->oflags, oflag)

Definition at line 168 of file bmesh_operator_api.h.

◆ BMO_edge_flag_toggle

#define BMO_edge_flag_toggle (   bm,
  e,
  oflag 
)    _bmo_elem_flag_toggle(bm, _BMO_CAST_E(e)->oflags, oflag)

Definition at line 175 of file bmesh_operator_api.h.

◆ BMO_elem_flag_disable

#define BMO_elem_flag_disable (   bm,
  ele,
  oflag 
)
Value:
#define BM_CHECK_TYPE_ELEM_NONCONST(ele)
Definition: bmesh_class.h:433
ATTR_WARN_UNUSED_RESULT BMesh * bm
BLI_INLINE BMFlagLayer * BMO_elem_flag_from_header(BMHeader *ele_head)
BLI_INLINE void _bmo_elem_flag_disable(BMesh *bm, BMFlagLayer *oflags, const short oflag)
ATTR_WARN_UNUSED_RESULT const BMFlagLayer const short oflag

Definition at line 90 of file bmesh_operator_api.h.

◆ BMO_elem_flag_enable

#define BMO_elem_flag_enable (   bm,
  ele,
  oflag 
)
Value:
BLI_INLINE void _bmo_elem_flag_enable(BMesh *bm, BMFlagLayer *oflags, const short oflag)

Definition at line 87 of file bmesh_operator_api.h.

◆ BMO_elem_flag_set

#define BMO_elem_flag_set (   bm,
  ele,
  oflag,
  val 
)
Value:
oflag, \
val)
BLI_INLINE void _bmo_elem_flag_set(BMesh *bm, BMFlagLayer *oflags, const short oflag, int val)

Definition at line 93 of file bmesh_operator_api.h.

◆ BMO_elem_flag_test

#define BMO_elem_flag_test (   bm,
  ele,
  oflag 
)     _bmo_elem_flag_test(bm, BMO_elem_flag_from_header(&(ele)->head), oflag)

Definition at line 83 of file bmesh_operator_api.h.

◆ BMO_elem_flag_test_bool

#define BMO_elem_flag_test_bool (   bm,
  ele,
  oflag 
)     _bmo_elem_flag_test_bool(bm, BMO_elem_flag_from_header(&(ele)->head), oflag)

Definition at line 85 of file bmesh_operator_api.h.

◆ BMO_elem_flag_toggle

#define BMO_elem_flag_toggle (   bm,
  ele,
  oflag 
)
Value:
BLI_INLINE void _bmo_elem_flag_toggle(BMesh *bm, BMFlagLayer *oflags, const short oflag)

Definition at line 98 of file bmesh_operator_api.h.

◆ BMO_face_flag_disable

#define BMO_face_flag_disable (   bm,
  e,
  oflag 
)     _bmo_elem_flag_disable(bm, _BMO_CAST_F(e)->oflags, oflag)

Definition at line 182 of file bmesh_operator_api.h.

◆ BMO_face_flag_enable

#define BMO_face_flag_enable (   bm,
  e,
  oflag 
)    _bmo_elem_flag_enable(bm, _BMO_CAST_F(e)->oflags, oflag)

Definition at line 181 of file bmesh_operator_api.h.

◆ BMO_face_flag_set

#define BMO_face_flag_set (   bm,
  e,
  oflag,
  val 
)     _bmo_elem_flag_set(bm, _BMO_CAST_F(e)->oflags, oflag, val)

Definition at line 184 of file bmesh_operator_api.h.

◆ BMO_face_flag_test

#define BMO_face_flag_test (   bm,
  e,
  oflag 
)     _bmo_elem_flag_test(bm, _BMO_CAST_F_CONST(e)->oflags, oflag)

Definition at line 177 of file bmesh_operator_api.h.

◆ BMO_face_flag_test_bool

#define BMO_face_flag_test_bool (   bm,
  e,
  oflag 
)     _bmo_elem_flag_test_bool(bm, _BMO_CAST_F_CONST(e)->oflags, oflag)

Definition at line 179 of file bmesh_operator_api.h.

◆ BMO_face_flag_toggle

#define BMO_face_flag_toggle (   bm,
  e,
  oflag 
)    _bmo_elem_flag_toggle(bm, _BMO_CAST_F(e)->oflags, oflag)

Definition at line 186 of file bmesh_operator_api.h.

◆ BMO_FLAG_DEFAULTS

#define BMO_FLAG_DEFAULTS   BMO_FLAG_RESPECT_HIDE

Definition at line 325 of file bmesh_operator_api.h.

◆ BMO_ITER

#define BMO_ITER (   ele,
  iter,
  slot_args,
  slot_name,
  restrict_flag 
)
Value:
for (BM_CHECK_TYPE_ELEM_ASSIGN(ele) = BMO_iter_new(iter, slot_args, slot_name, restrict_flag); \
ele; \
BM_CHECK_TYPE_ELEM_ASSIGN(ele) = BMO_iter_step(iter))
#define BM_CHECK_TYPE_ELEM_ASSIGN(ele)
Definition: bmesh_class.h:466
void * BMO_iter_new(BMOIter *iter, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const char restrictmask)
New Iterator.
void * BMO_iter_step(BMOIter *iter)

Definition at line 652 of file bmesh_operator_api.h.

◆ BMO_ITER_INDEX

#define BMO_ITER_INDEX (   ele,
  iter,
  slot_args,
  slot_name,
  restrict_flag,
  i_ 
)
Value:
for (BM_CHECK_TYPE_ELEM_ASSIGN(ele) = BMO_iter_new(iter, slot_args, slot_name, restrict_flag), \
i_ = 0; \
ele; \
BM_CHECK_TYPE_ELEM_ASSIGN(ele) = BMO_iter_step(iter), i_++)

Definition at line 657 of file bmesh_operator_api.h.

◆ BMO_OP_MAX_SLOTS

#define BMO_OP_MAX_SLOTS   21

Definition at line 298 of file bmesh_operator_api.h.

◆ BMO_OP_SLOT_TOTAL_TYPES

#define BMO_OP_SLOT_TOTAL_TYPES   11

Definition at line 216 of file bmesh_operator_api.h.

◆ BMO_SLOT_AS_BOOL

#define BMO_SLOT_AS_BOOL (   slot)    ((slot)->data.i)

Definition at line 285 of file bmesh_operator_api.h.

◆ BMO_SLOT_AS_BUFFER

#define BMO_SLOT_AS_BUFFER (   slot)    ((slot)->data.buf)

Definition at line 290 of file bmesh_operator_api.h.

◆ BMO_SLOT_AS_FLOAT

#define BMO_SLOT_AS_FLOAT (   slot)    ((slot)->data.f)

Definition at line 287 of file bmesh_operator_api.h.

◆ BMO_SLOT_AS_GHASH

#define BMO_SLOT_AS_GHASH (   slot)    ((slot)->data.ghash)

Definition at line 291 of file bmesh_operator_api.h.

◆ BMO_SLOT_AS_INT

#define BMO_SLOT_AS_INT (   slot)    ((slot)->data.i)

Definition at line 286 of file bmesh_operator_api.h.

◆ BMO_SLOT_AS_MATRIX

#define BMO_SLOT_AS_MATRIX (   slot)    ((float(*)[4])((slot)->data.p))

Definition at line 289 of file bmesh_operator_api.h.

◆ BMO_SLOT_AS_VECTOR

#define BMO_SLOT_AS_VECTOR (   slot)    ((slot)->data.vec)

Definition at line 288 of file bmesh_operator_api.h.

◆ BMO_slot_buffer_append

#define BMO_slot_buffer_append (   op_src,
  slots_src,
  slot_name_src,
  op_dst,
  slots_dst,
  slot_name_dst 
)
Value:
(op_src)->slots_src, slot_name_src, (op_dst)->slots_dst, slot_name_dst, (op_dst)->arena)
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)

Definition at line 483 of file bmesh_operator_api.h.

◆ BMO_slot_copy

#define BMO_slot_copy (   op_src,
  slots_src,
  slot_name_src,
  op_dst,
  slots_dst,
  slot_name_dst 
)
Value:
(op_src)->slots_src, slot_name_src, (op_dst)->slots_dst, slot_name_dst, (op_dst)->arena)
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.

Definition at line 392 of file bmesh_operator_api.h.

◆ BMO_vert_flag_disable

#define BMO_vert_flag_disable (   bm,
  e,
  oflag 
)     _bmo_elem_flag_disable(bm, _BMO_CAST_V(e)->oflags, oflag)

Definition at line 160 of file bmesh_operator_api.h.

◆ BMO_vert_flag_enable

#define BMO_vert_flag_enable (   bm,
  e,
  oflag 
)    _bmo_elem_flag_enable(bm, _BMO_CAST_V(e)->oflags, oflag)

Definition at line 159 of file bmesh_operator_api.h.

◆ BMO_vert_flag_set

#define BMO_vert_flag_set (   bm,
  e,
  oflag,
  val 
)     _bmo_elem_flag_set(bm, _BMO_CAST_V(e)->oflags, oflag, val)

Definition at line 162 of file bmesh_operator_api.h.

◆ BMO_vert_flag_test

#define BMO_vert_flag_test (   bm,
  e,
  oflag 
)     _bmo_elem_flag_test(bm, _BMO_CAST_V_CONST(e)->oflags, oflag)

Definition at line 155 of file bmesh_operator_api.h.

◆ BMO_vert_flag_test_bool

#define BMO_vert_flag_test_bool (   bm,
  e,
  oflag 
)     _bmo_elem_flag_test_bool(bm, _BMO_CAST_V_CONST(e)->oflags, oflag)

Definition at line 157 of file bmesh_operator_api.h.

◆ BMO_vert_flag_toggle

#define BMO_vert_flag_toggle (   bm,
  e,
  oflag 
)    _bmo_elem_flag_toggle(bm, _BMO_CAST_V(e)->oflags, oflag)

Definition at line 164 of file bmesh_operator_api.h.

◆ MAX_SLOTNAME

#define MAX_SLOTNAME   32

Definition at line 327 of file bmesh_operator_api.h.

Typedef Documentation

◆ BMO_FlagSet

typedef struct BMO_FlagSet BMO_FlagSet

◆ BMOIter

typedef struct BMOIter BMOIter

This part of the API is used to iterate over element buffer or mapping slots.

for example, iterating over the faces in a slot is:

BMOIter oiter;
BMFace *f;
f = BMO_iter_new(&oiter, some_operator, "slot_name", BM_FACE);
for (; f; f = BMO_iter_step(&oiter)) {
// do something with the face
}
another example, iterating over a mapping:
BMOIter oiter;
void *key;
void *val;
key = BMO_iter_new(&oiter, bm, some_operator, "slot_name", 0);
for (; key; key = BMO_iter_step(&oiter)) {
val = BMO_iter_map_value(&oiter);
//do something with the key/val pair
//note that val is a pointer to the val data,
//whether it's a float, pointer, whatever.
//
// so to get a pointer, for example, use:
// *((void **)BMO_iter_map_value(&oiter));
//or something like that.
}
@ BM_FACE
Definition: bmesh_class.h:386
static unsigned a[3]
Definition: RandGen.cpp:92

◆ BMOpDefine

typedef struct BMOpDefine BMOpDefine

◆ BMOperator

typedef struct BMOperator BMOperator

◆ BMOpSlot

typedef struct BMOpSlot BMOpSlot

◆ BMOSlotType

typedef struct BMOSlotType BMOSlotType

◆ eBMOpSlotSubType_Elem

◆ eBMOpSlotSubType_Int

◆ eBMOpSlotSubType_Map

◆ eBMOpSlotSubType_Ptr

◆ eBMOpSlotSubType_Union

◆ eBMOpSlotType

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
BMO_FLAG_RESPECT_HIDE 

Definition at line 321 of file bmesh_operator_api.h.

◆ anonymous enum

anonymous enum
Enumerator
DEL_VERTS 
DEL_EDGES 
DEL_ONLYFACES 
DEL_EDGESFACES 
DEL_FACES 
DEL_FACES_KEEP_BOUNDARY 
DEL_ONLYTAGGED 

Definition at line 403 of file bmesh_operator_api.h.

◆ BMO_Delimit

Enumerator
BMO_DELIM_NORMAL 
BMO_DELIM_MATERIAL 
BMO_DELIM_SEAM 
BMO_DELIM_SHARP 
BMO_DELIM_UV 

Definition at line 425 of file bmesh_operator_api.h.

◆ BMO_SymmDirection

Enumerator
BMO_SYMMETRIZE_NEGATIVE_X 
BMO_SYMMETRIZE_NEGATIVE_Y 
BMO_SYMMETRIZE_NEGATIVE_Z 
BMO_SYMMETRIZE_POSITIVE_X 
BMO_SYMMETRIZE_POSITIVE_Y 
BMO_SYMMETRIZE_POSITIVE_Z 

Definition at line 415 of file bmesh_operator_api.h.

◆ BMOpTypeFlag

Enumerator
BMO_OPTYPE_FLAG_NOP 
BMO_OPTYPE_FLAG_UNTAN_MULTIRES 

Switch from multires tangent space to absolute coordinates.

BMO_OPTYPE_FLAG_NORMALS_CALC 
BMO_OPTYPE_FLAG_SELECT_FLUSH 
BMO_OPTYPE_FLAG_SELECT_VALIDATE 
BMO_OPTYPE_FLAG_INVALIDATE_CLNOR_ALL 

Definition at line 301 of file bmesh_operator_api.h.

◆ eBMOpSlotSubType_Elem

Enumerator
BMO_OP_SLOT_SUBTYPE_ELEM_VERT 
BMO_OP_SLOT_SUBTYPE_ELEM_EDGE 
BMO_OP_SLOT_SUBTYPE_ELEM_FACE 
BMO_OP_SLOT_SUBTYPE_ELEM_IS_SINGLE 

Definition at line 219 of file bmesh_operator_api.h.

◆ eBMOpSlotSubType_Int

Enumerator
BMO_OP_SLOT_SUBTYPE_INT_ENUM 
BMO_OP_SLOT_SUBTYPE_INT_FLAG 

Definition at line 241 of file bmesh_operator_api.h.

◆ eBMOpSlotSubType_Map

Enumerator
BMO_OP_SLOT_SUBTYPE_MAP_EMPTY 
BMO_OP_SLOT_SUBTYPE_MAP_ELEM 
BMO_OP_SLOT_SUBTYPE_MAP_FLT 
BMO_OP_SLOT_SUBTYPE_MAP_INT 
BMO_OP_SLOT_SUBTYPE_MAP_BOOL 
BMO_OP_SLOT_SUBTYPE_MAP_INTERNAL 

Definition at line 226 of file bmesh_operator_api.h.

◆ eBMOpSlotSubType_Ptr

Enumerator
BMO_OP_SLOT_SUBTYPE_PTR_BMESH 
BMO_OP_SLOT_SUBTYPE_PTR_SCENE 
BMO_OP_SLOT_SUBTYPE_PTR_OBJECT 
BMO_OP_SLOT_SUBTYPE_PTR_MESH 
BMO_OP_SLOT_SUBTYPE_PTR_STRUCT 

Definition at line 234 of file bmesh_operator_api.h.

◆ eBMOpSlotType

Enumerator
BMO_OP_SLOT_BOOL 
BMO_OP_SLOT_INT 
BMO_OP_SLOT_FLT 
BMO_OP_SLOT_PTR 
BMO_OP_SLOT_MAT 
BMO_OP_SLOT_VEC 
BMO_OP_SLOT_ELEMENT_BUF 
BMO_OP_SLOT_MAPPING 

Definition at line 197 of file bmesh_operator_api.h.

Function Documentation

◆ _bmo_elem_flag_disable()

BLI_INLINE void _bmo_elem_flag_disable ( BMesh bm,
BMFlagLayer oflags,
const short  oflag 
)

◆ _bmo_elem_flag_enable()

BLI_INLINE void _bmo_elem_flag_enable ( BMesh bm,
BMFlagLayer oflags,
const short  oflag 
)

◆ _bmo_elem_flag_set()

BLI_INLINE void _bmo_elem_flag_set ( BMesh bm,
BMFlagLayer oflags,
const short  oflag,
int  val 
)

◆ _bmo_elem_flag_test()

BLI_INLINE short _bmo_elem_flag_test ( BMesh bm,
const BMFlagLayer oflags,
const short  oflag 
)

◆ _bmo_elem_flag_test_bool()

BLI_INLINE bool _bmo_elem_flag_test_bool ( BMesh bm,
const BMFlagLayer oflags,
const short  oflag 
)

◆ _bmo_elem_flag_toggle()

BLI_INLINE void _bmo_elem_flag_toggle ( BMesh bm,
BMFlagLayer oflags,
const short  oflag 
)

◆ _bmo_slot_buffer_append()

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 
)

Copies the values from another slot to the end of the output slot.

Definition at line 1004 of file bmesh_operators.c.

References _bmo_slot_copy(), BLI_assert, BLI_memarena_alloc(), BMO_OP_SLOT_ELEMENT_BUF, BMO_OPSLOT_TYPEINFO, BMO_slot_get(), BMOpSlot::buf, BMOpSlot::data, BMOpSlot::len, and BMOpSlot::slot_type.

◆ _bmo_slot_copy()

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 
)

◆ BMO_elem_flag_from_header()

BLI_INLINE BMFlagLayer* BMO_elem_flag_from_header ( BMHeader ele_head)

Definition at line 71 of file bmesh_operator_api.h.

References BM_EDGE, BM_VERT, and BMHeader::htype.

◆ BMO_iter_map_value_bool()

bool BMO_iter_map_value_bool ( BMOIter iter)

◆ BMO_iter_map_value_float()

float BMO_iter_map_value_float ( BMOIter iter)

◆ BMO_iter_map_value_int()

int BMO_iter_map_value_int ( BMOIter iter)

◆ BMO_iter_map_value_p()

void** BMO_iter_map_value_p ( BMOIter iter)

Returns a pointer to the key-value when iterating over mappings. remember for pointer maps this will be a pointer to a pointer.

Definition at line 1531 of file bmesh_operators.c.

References BMOIter::val.

◆ BMO_iter_map_value_ptr()

void* BMO_iter_map_value_ptr ( BMOIter iter)

◆ BMO_iter_new()

void* BMO_iter_new ( BMOIter iter,
BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name,
const char  restrictmask 
)

New Iterator.

Parameters
restrictmaskrestricts the iteration to certain element types (e.g. combination of BM_VERT, BM_EDGE, BM_FACE), if iterating over an element buffer (not a mapping).

Definition at line 1454 of file bmesh_operators.c.

References BLI_assert, BLI_ghashIterator_init(), BMO_iter_step(), BMO_OP_SLOT_ELEMENT_BUF, BMO_OP_SLOT_MAPPING, BMO_slot_get(), BMOIter::cur, BMOpSlot::data, eBMOpSlotSubType_Union::elem, BMOpSlot::ghash, BMOIter::giter, BMOIter::restrictmask, BMOIter::slot, BMOpSlot::slot_subtype, and BMOpSlot::slot_type.

Referenced by bmesh_find_doubles_common(), bmo_extrude_edge_only_exec(), bmo_extrude_face_region_exec(), bmo_extrude_vert_indiv_exec(), BMO_iter_as_array(), and BMO_iter_as_arrayN().

◆ BMO_iter_step()

void* BMO_iter_step ( BMOIter iter)

◆ BMO_mesh_disabled_flag_count()

int BMO_mesh_disabled_flag_count ( BMesh bm,
const char  htype,
const short  oflag 
)

Definition at line 616 of file bmesh_operators.c.

References bm, bmo_mesh_flag_count(), and oflag.

Referenced by bmo_slot_buffer_from_flag().

◆ BMO_mesh_enabled_flag_count()

int BMO_mesh_enabled_flag_count ( BMesh bm,
const char  htype,
const short  oflag 
)

Definition at line 611 of file bmesh_operators.c.

References bm, bmo_mesh_flag_count(), and oflag.

Referenced by bmo_slot_buffer_from_flag().

◆ BMO_mesh_flag_disable_all()

void BMO_mesh_flag_disable_all ( BMesh bm,
BMOperator op,
const char  htype,
const short  oflag 
)

◆ BMO_mesh_selected_remap()

void BMO_mesh_selected_remap ( BMesh bm,
BMOpSlot slot_vert_map,
BMOpSlot slot_edge_map,
BMOpSlot slot_face_map,
const bool  check_select 
)

◆ BMO_op_callf()

bool BMO_op_callf ( BMesh bm,
const int  flag,
const char *  fmt,
  ... 
)

◆ BMO_op_exec()

void BMO_op_exec ( BMesh bm,
BMOperator op 
)

BMESH OPSTACK EXEC OP.

Executes a passed in operator.

This handles the allocation and freeing of temporary flag layers and starting/stopping the modeling loop. Can be called from other operators exec callbacks as well.

Definition at line 211 of file bmesh_operators.c.

References bm, BM_mesh_elem_toolflags_ensure(), bmesh_edit_begin(), bmesh_edit_end(), BMO_pop(), BMO_push(), BMOperator::exec, BMesh::toolflag_index, and BMOperator::type_flag.

Referenced by bm_bridge_splice_loops(), BM_mesh_esubdivide(), bm_vert_connect_pair(), bmo_collapse_exec(), bmo_connect_vert_pair_exec(), bmo_contextual_create_exec(), bmo_create_icosphere_exec(), bmo_create_uvsphere_exec(), bmo_edgenet_fill_exec(), bmo_extrude_edge_only_exec(), bmo_extrude_face_region_exec(), bmo_holes_fill_exec(), bmo_mirror_exec(), BMO_op_callf(), bmo_pointmerge_exec(), bmo_remove_doubles_exec(), bmo_solidify_face_region_exec(), bmo_spin_exec(), bmo_split_exec(), bmo_symmetrize_exec(), bmo_triangle_fill_exec(), BPy_BMO_call(), bridge_loop_pair(), build_hull(), collapse_face_corners(), edbm_add_edge_face_exec(), EDBM_automerge(), EDBM_automerge_and_split(), edbm_bevel_calc(), edbm_bridge_edge_loops_for_single_editmesh(), edbm_connect_vert_pair(), edbm_dupli_extrude_cursor_invoke(), edbm_duplicate_exec(), edbm_edge_rotate_selected_exec(), edbm_extrude_discrete_faces(), edbm_extrude_edges_indiv(), edbm_extrude_ex(), edbm_extrude_verts_indiv(), edbm_fill_exec(), edbm_fill_grid_exec(), edbm_inset_calc(), edbm_knife_cut_exec(), edbm_offset_edgeloop_exec(), EDBM_op_call_and_selectf(), EDBM_op_call_silentf(), EDBM_op_callf(), edbm_poke_face_exec(), edbm_quads_convert_to_tris_exec(), edbm_remove_doubles_exec(), edbm_reverse_colors_exec(), edbm_reverse_uvs_exec(), edbm_rotate_colors_exec(), edbm_rotate_uvs_exec(), edbm_screw_exec(), EDBM_select_less(), EDBM_select_more(), edbm_solidify_exec(), edbm_spin_exec(), edbm_split_exec(), edbm_unsubdivide_exec(), edbm_wireframe_exec(), lineart_geometry_object_load(), mesh_bisect_exec(), mesh_symmetrize_exec(), and skin_fix_hole_no_good_verts().

◆ BMO_op_finish()

void BMO_op_finish ( BMesh bm,
BMOperator op 
)

◆ BMO_op_flag_disable()

void BMO_op_flag_disable ( BMesh bm,
BMOperator op,
const int  op_flag 
)

◆ BMO_op_flag_enable()

void BMO_op_flag_enable ( BMesh bm,
BMOperator op,
const int  op_flag 
)

◆ BMO_op_init()

void BMO_op_init ( BMesh bm,
BMOperator op,
const int  flag,
const char *  opname 
)

◆ BMO_op_initf()

bool BMO_op_initf ( BMesh bm,
BMOperator op,
const int  flag,
const char *  fmt,
  ... 
)

◆ BMO_op_vinitf()

bool BMO_op_vinitf ( BMesh bm,
BMOperator op,
const int  flag,
const char *  _fmt,
va_list  vlist 
)

Format Strings for BMOperator Initialization.

This system is used to execute or initialize an operator, using a formatted-string system.

The basic format for the format string is: [operatorname] [slot_name]=%[code] [slot_name]=%[code]

Example:

"delete context=%i geom=%hv",
@ BM_ELEM_SELECT
Definition: bmesh_class.h:471
@ DEL_ONLYFACES
#define BMO_FLAG_DEFAULTS
bool BMO_op_callf(BMesh *bm, const int flag, const char *fmt,...)

Primitive Types

Pass an existing slot which is copied to either an input or output slot. Taking the operator and slot-name pair of args (BMOperator *, const char *).

  • s - slot_in (lower case)
  • S - slot_out (upper case) Element Buffer (BMO_OP_SLOT_ELEMENT_BUF)
  • e - single element vert/edge/face (use with BMO_OP_SLOT_SUBTYPE_ELEM_IS_SINGLE).
  • eb - elem buffer, take an array and a length.
  • av - all verts
  • ae - all edges
  • af - all faces
  • hv - header flagged verts (hflag)
  • he - header flagged edges (hflag)
  • hf - header flagged faces (hflag)
  • Hv - header flagged verts (hflag off)
  • He - header flagged edges (hflag off)
  • Hf - header flagged faces (hflag off)
  • fv - flagged verts (oflag)
  • fe - flagged edges (oflag)
  • ff - flagged faces (oflag)
  • Fv - flagged verts (oflag off)
  • Fe - flagged edges (oflag off)
  • Ff - flagged faces (oflag off)
Note
The common v/e/f suffix can be mixed, so avef is can be used for all verts, edges and faces. Order is not important so Hfev is also valid (all un-flagged verts, edges and faces).

Definition at line 1737 of file bmesh_operators.c.

References BLI_assert, BLI_strdup(), BLI_strncpy(), bm, BM_EDGE, BM_ELEM_HIDDEN, BM_FACE, BM_VERT, BMO_FLAG_RESPECT_HIDE, bmo_name_to_slotcode_check(), BMO_op_finish(), BMO_op_init(), BMO_opcode_from_opname_check(), BMO_slot_bool_set(), BMO_slot_buffer_from_all(), BMO_slot_buffer_from_array(), BMO_slot_buffer_from_disabled_flag(), BMO_slot_buffer_from_disabled_hflag(), BMO_slot_buffer_from_enabled_flag(), BMO_slot_buffer_from_enabled_hflag(), BMO_slot_buffer_from_single(), BMO_slot_copy, BMO_slot_float_set(), BMO_slot_get(), BMO_slot_int_set(), BMO_slot_mat_set(), BMO_slot_ptr_set(), BMO_slot_vec_set(), Freestyle::c, error(), BMOperator::flag, GOTO_ERROR, MEM_freeN, NEXT_CHAR, BMOpError::op, pos, size(), BMOperator::slots_in, BMOperator::slots_out, state, type, and UNLIKELY.

Referenced by BMO_op_callf(), BMO_op_initf(), EDBM_op_call_and_selectf(), EDBM_op_call_silentf(), EDBM_op_callf(), and EDBM_op_init().

◆ BMO_opcode_from_opname()

int BMO_opcode_from_opname ( const char *  opname)

◆ BMO_pop()

void BMO_pop ( BMesh bm)

BMESH OPSTACK POP.

Pops the opstack one level and frees a flag layer if appropriate

BMESH_TODO: investigate NOT freeing flag layers.

Definition at line 111 of file bmesh_operators.c.

References bm, bmo_flag_layer_free(), and BMesh::toolflag_index.

Referenced by BMO_op_exec(), build_skin(), and walker_deselect_nth().

◆ BMO_push()

void BMO_push ( BMesh bm,
BMOperator op 
)

Referenced by build_skin(), and walker_deselect_nth().

◆ BMO_slot_as_arrayN()

void* BMO_slot_as_arrayN ( BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name,
int *  len 
)

◆ BMO_slot_bool_get()

bool BMO_slot_bool_get ( BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name 
)

◆ BMO_slot_bool_set()

void BMO_slot_bool_set ( BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name,
const bool  i 
)

◆ BMO_slot_buffer_alloc()

void* BMO_slot_buffer_alloc ( BMOperator op,
BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name,
const int  len 
)

◆ BMO_slot_buffer_count()

int BMO_slot_buffer_count ( BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name 
)

◆ BMO_slot_buffer_flag_disable()

void BMO_slot_buffer_flag_disable ( BMesh bm,
BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name,
const char  htype,
const short  oflag 
)

◆ BMO_slot_buffer_flag_enable()

void BMO_slot_buffer_flag_enable ( BMesh bm,
BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name,
const char  htype,
const short  oflag 
)

◆ BMO_slot_buffer_from_all()

void BMO_slot_buffer_from_all ( BMesh bm,
BMOperator op,
BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name,
const char  htype 
)

BMO_ALL_TO_SLOT.

Copies all elements of a certain type into an operator slot.

Definition at line 815 of file bmesh_operators.c.

References BLI_assert, bm, BM_ALL_NOLOOP, BM_EDGE, BM_EDGES_OF_MESH, BM_FACE, BM_FACES_OF_MESH, BM_ITER_MESH, BM_VERT, BM_VERTS_OF_MESH, BMO_OP_SLOT_ELEMENT_BUF, BMO_slot_buffer_alloc(), BMO_slot_get(), output, BMesh::totedge, BMesh::totface, and BMesh::totvert.

Referenced by BMO_op_vinitf(), and bpy_slot_from_py().

◆ BMO_slot_buffer_from_array()

void BMO_slot_buffer_from_array ( BMOperator op,
BMOpSlot slot,
BMHeader **  ele_buffer,
int  ele_buffer_len 
)

◆ BMO_slot_buffer_from_disabled_flag()

void BMO_slot_buffer_from_disabled_flag ( BMesh bm,
BMOperator op,
BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name,
const char  htype,
const short  oflag 
)

Definition at line 1119 of file bmesh_operators.c.

References bm, bmo_slot_buffer_from_flag(), and oflag.

Referenced by BMO_op_vinitf().

◆ BMO_slot_buffer_from_disabled_hflag()

void BMO_slot_buffer_from_disabled_hflag ( BMesh bm,
BMOperator op,
BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name,
const char  htype,
const char  hflag 
)

Definition at line 951 of file bmesh_operators.c.

References bm, and bmo_slot_buffer_from_hflag().

Referenced by BMO_op_vinitf().

◆ BMO_slot_buffer_from_enabled_flag()

void BMO_slot_buffer_from_enabled_flag ( BMesh bm,
BMOperator op,
BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name,
const char  htype,
const short  oflag 
)

◆ BMO_slot_buffer_from_enabled_hflag()

void BMO_slot_buffer_from_enabled_hflag ( BMesh bm,
BMOperator op,
BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name,
const char  htype,
const char  hflag 
)

◆ BMO_slot_buffer_from_single()

void BMO_slot_buffer_from_single ( BMOperator op,
BMOpSlot slot,
BMHeader ele 
)

◆ BMO_slot_buffer_get_first()

void* BMO_slot_buffer_get_first ( BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name 
)

◆ BMO_slot_buffer_get_single()

void* BMO_slot_buffer_get_single ( BMOpSlot slot)

◆ BMO_slot_buffer_hflag_disable()

void BMO_slot_buffer_hflag_disable ( BMesh bm,
BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name,
const char  htype,
const char  hflag,
const bool  do_flush 
)

◆ BMO_slot_buffer_hflag_enable()

void BMO_slot_buffer_hflag_enable ( BMesh bm,
BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name,
const char  htype,
const char  hflag,
const bool  do_flush 
)

◆ BMO_slot_exists()

bool BMO_slot_exists ( BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  identifier 
)

BMESH OPSTACK HAS SLOT.

Returns
Success if the slot if found.

Definition at line 257 of file bmesh_operators.c.

References bmo_name_to_slotcode().

Referenced by bmesh_find_doubles_common(), and BPy_BMO_call().

◆ BMO_slot_float_get()

float BMO_slot_float_get ( BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name 
)

◆ BMO_slot_float_set()

void BMO_slot_float_set ( BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name,
const float  f 
)

◆ BMO_slot_get()

BMOpSlot* BMO_slot_get ( BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  identifier 
)

BMESH OPSTACK GET SLOT.

Returns a pointer to the slot of type 'slot_code'

Definition at line 268 of file bmesh_operators.c.

References BLI_assert, bmo_name_to_slotcode_check(), NULL, and UNLIKELY.

Referenced by _bmo_slot_buffer_append(), _bmo_slot_copy(), bm_bridge_splice_loops(), bmesh_find_doubles_common(), bmo_bisect_edges_exec(), bmo_collapse_exec(), bmo_connect_vert_pair_exec(), bmo_create_grid_exec(), bmo_dissolve_limit_exec(), bmo_extrude_face_region_exec(), bmo_find_doubles_exec(), BMO_iter_new(), bmo_mesh_copy(), bmo_mirror_exec(), BMO_op_vinitf(), bmo_pointmerge_exec(), bmo_pointmerge_facedata_exec(), bmo_remove_doubles_exec(), BMO_slot_as_arrayN(), BMO_slot_bool_get(), BMO_slot_bool_set(), BMO_slot_buffer_alloc(), BMO_slot_buffer_count(), BMO_slot_buffer_flag_disable(), BMO_slot_buffer_flag_enable(), BMO_slot_buffer_from_all(), bmo_slot_buffer_from_flag(), bmo_slot_buffer_from_hflag(), BMO_slot_buffer_get_first(), BMO_slot_buffer_hflag_disable(), BMO_slot_buffer_hflag_enable(), BMO_slot_float_get(), BMO_slot_float_set(), BMO_slot_int_get(), BMO_slot_int_set(), BMO_slot_map_count(), BMO_slot_map_to_flag(), BMO_slot_mat3_get(), BMO_slot_mat4_get(), BMO_slot_mat_set(), BMO_slot_ptr_get(), BMO_slot_ptr_set(), BMO_slot_vec_get(), BMO_slot_vec_set(), bmo_spin_exec(), bmo_subdivide_edges_exec(), bmo_symmetrize_exec(), bmo_triangulate_exec(), bmo_unsubdivide_exec(), bmo_weld_verts_exec(), BPy_BMO_call(), collapse_face_corners(), EDBM_automerge_and_split(), edbm_connect_vert_pair(), edbm_extrude_ex(), edbm_knife_cut_exec(), EDBM_op_call_and_selectf(), and skin_fix_hole_no_good_verts().

◆ BMO_slot_int_get()

int BMO_slot_int_get ( BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name 
)

◆ BMO_slot_int_set()

void BMO_slot_int_set ( BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name,
const int  i 
)

◆ BMO_slot_map_count()

int BMO_slot_map_count ( BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name 
)

◆ BMO_slot_map_insert()

void BMO_slot_map_insert ( BMOperator op,
BMOpSlot slot,
const void *  element,
const void *  data 
)

◆ BMO_slot_map_to_flag()

void BMO_slot_map_to_flag ( BMesh bm,
BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name,
const char  htype,
const short  oflag 
)

◆ BMO_slot_mat3_get()

void BMO_slot_mat3_get ( BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name,
float  r_mat[3][3] 
)

◆ BMO_slot_mat4_get()

void BMO_slot_mat4_get ( BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name,
float  r_mat[4][4] 
)

◆ BMO_slot_mat_set()

void BMO_slot_mat_set ( BMOperator op,
BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name,
const float mat,
int  size 
)

◆ BMO_slot_ptr_get()

void* BMO_slot_ptr_get ( BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name 
)

◆ BMO_slot_ptr_set()

void BMO_slot_ptr_set ( BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name,
void *  p 
)

◆ BMO_slot_vec_get()

void BMO_slot_vec_get ( BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name,
float  r_vec[3] 
)

◆ BMO_slot_vec_set()

void BMO_slot_vec_set ( BMOpSlot  slot_args[BMO_OP_MAX_SLOTS],
const char *  slot_name,
const float  vec[3] 
)

Variable Documentation

◆ BMO_OPSLOT_TYPEINFO

const int BMO_OPSLOT_TYPEINFO[BMO_OP_SLOT_TOTAL_TYPES]
extern