|
Blender
V2.93
|
#include "MEM_guardedalloc.h"#include "BLI_listbase.h"#include "BLI_math.h"#include "BLI_memarena.h"#include "BLI_mempool.h"#include "BLI_string.h"#include "BLI_utildefines.h"#include "BLT_translation.h"#include "bmesh.h"#include "intern/bmesh_private.h"Go to the source code of this file.
Classes | |
| struct | BMOpError |
Macros | |
| #define | NEXT_CHAR(fmt) ((fmt)[0] != 0 ? (fmt)[1] : 0) |
| #define | GOTO_ERROR(reason) |
Typedefs | |
| typedef struct BMOpError | BMOpError |
Functions | |
| static void | bmo_flag_layer_alloc (BMesh *bm) |
| ALLOC/FREE FLAG LAYER. More... | |
| static void | bmo_flag_layer_free (BMesh *bm) |
| static void | bmo_flag_layer_clear (BMesh *bm) |
| static int | bmo_name_to_slotcode (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *identifier) |
| static int | bmo_name_to_slotcode_check (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *identifier) |
| BLI_STATIC_ASSERT (ARRAY_SIZE(bmo_error_messages)==BMERR_TOTAL, "message mismatch") | |
| void | BMO_op_flag_enable (BMesh *UNUSED(bm), BMOperator *op, const int op_flag) |
| void | BMO_op_flag_disable (BMesh *UNUSED(bm), BMOperator *op, const int op_flag) |
| void | BMO_push (BMesh *bm, BMOperator *UNUSED(op)) |
| BMESH OPSTACK PUSH. More... | |
| void | BMO_pop (BMesh *bm) |
| BMESH OPSTACK POP. More... | |
| static void | bmo_op_slots_init (const BMOSlotType *slot_types, BMOpSlot *slot_args) |
| static void | bmo_op_slots_free (const BMOSlotType *slot_types, BMOpSlot *slot_args) |
| 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... | |
| bool | BMO_slot_exists (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *identifier) |
| BMESH OPSTACK HAS SLOT. More... | |
| BMOpSlot * | BMO_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_slot_float_set (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const float f) |
| void | BMO_slot_int_set (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const int i) |
| void | BMO_slot_bool_set (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const bool i) |
| 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_slot_ptr_set (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, void *p) |
| void | BMO_slot_vec_set (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const float vec[3]) |
| float | BMO_slot_float_get (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name) |
| int | BMO_slot_int_get (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name) |
| 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_get (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name) |
| void | BMO_slot_vec_get (BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, float r_vec[3]) |
| static int | bmo_mesh_flag_count (BMesh *bm, const char htype, const short oflag, const bool test_for_enabled) |
| 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_mesh_flag_disable_all (BMesh *bm, BMOperator *UNUSED(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) |
| 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... | |
| static void | bmo_slot_buffer_from_hflag (BMesh *bm, BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const char htype, const char hflag, const bool test_for_enabled) |
| BMO_HEADERFLAG_TO_SLOT. 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_single (BMOperator *op, BMOpSlot *slot, BMHeader *ele) |
| void | BMO_slot_buffer_from_array (BMOperator *op, BMOpSlot *slot, BMHeader **ele_buffer, int ele_buffer_len) |
| void * | BMO_slot_buffer_get_single (BMOpSlot *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) |
| static void | bmo_slot_buffer_from_flag (BMesh *bm, BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const char htype, const short oflag, const bool test_for_enabled) |
| BMO_FLAG_TO_SLOT. More... | |
| 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_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_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_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) |
| void | BMO_error_clear (BMesh *bm) |
| void | BMO_error_raise (BMesh *bm, BMOperator *owner, int errcode, const char *msg) |
| bool | BMO_error_occurred (BMesh *bm) |
| int | BMO_error_get (BMesh *bm, const char **msg, BMOperator **op) |
| int | BMO_error_pop (BMesh *bm, const char **msg, BMOperator **op) |
| int | BMO_opcode_from_opname (const char *opname) |
| static int | BMO_opcode_from_opname_check (const char *opname) |
| 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_op_initf (BMesh *bm, BMOperator *op, const int flag, const char *fmt,...) |
| bool | BMO_op_callf (BMesh *bm, const int flag, const char *fmt,...) |
Variables | |
| static const char * | bmo_error_messages [] |
| const int | BMO_OPSLOT_TYPEINFO [BMO_OP_SLOT_TOTAL_TYPES] |
BMesh operator access.
Definition in file bmesh_operators.c.
| #define GOTO_ERROR | ( | reason | ) |
| #define NEXT_CHAR | ( | fmt | ) | ((fmt)[0] != 0 ? (fmt)[1] : 0) |
Definition at line 1628 of file bmesh_operators.c.
| 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.
| 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.
define used. Copies data from one slot to another.
Definition at line 287 of file bmesh_operators.c.
References BLI_assert, BLI_ghash_insert(), BLI_ghashIterator_getKey(), BLI_ghashIterator_getValue(), BLI_memarena_alloc(), BM_ALL_NOLOOP, BMO_OP_SLOT_ELEMENT_BUF, BMO_OP_SLOT_MAPPING, BMO_OPSLOT_TYPEINFO, BMO_slot_get(), BMOpSlot::buf, BMOpSlot::data, eBMOpSlotSubType_Union::elem, BMOpSlot::ghash, GHASH_ITER, BMOpSlot::len, NULL, BMOpSlot::slot_subtype, and BMOpSlot::slot_type.
Referenced by _bmo_slot_buffer_append().
| BLI_STATIC_ASSERT | ( | ARRAY_SIZE(bmo_error_messages) | = =BMERR_TOTAL, |
| "message mismatch" | |||
| ) |
| void BMO_error_clear | ( | BMesh * | bm | ) |
Definition at line 1570 of file bmesh_operators.c.
References bm, BMO_error_pop(), and NULL.
Referenced by BM_mesh_data_free(), BM_mesh_decimate_dissolve_ex(), bmo_dissolve_faces_exec(), bmo_triangle_fill_exec(), bpy_bm_op_as_py_error(), and BPy_BMO_call().
| int BMO_error_get | ( | BMesh * | bm, |
| const char ** | msg, | ||
| BMOperator ** | op | ||
| ) |
Definition at line 1597 of file bmesh_operators.c.
References bm, err, BMesh::errorstack, ListBase::first, BMOpError::msg, and BMOpError::op.
Referenced by BMO_error_pop(), bpy_bm_op_as_py_error(), and EDBM_op_finish().
| bool BMO_error_occurred | ( | BMesh * | bm | ) |
Definition at line 1591 of file bmesh_operators.c.
References BLI_listbase_is_empty(), bm, and BMesh::errorstack.
Referenced by bmo_dissolve_faces_exec(), bpy_bm_op_as_py_error(), build_hull(), and edbm_bridge_edge_loops_for_single_editmesh().
| int BMO_error_pop | ( | BMesh * | bm, |
| const char ** | msg, | ||
| BMOperator ** | op | ||
| ) |
Definition at line 1614 of file bmesh_operators.c.
References BLI_remlink(), bm, BMO_error_get(), err, BMOpError::errorcode, BMesh::errorstack, ListBase::first, MEM_freeN, BMOpError::msg, and BMOpError::op.
Referenced by BMO_error_clear().
| void BMO_error_raise | ( | BMesh * | bm, |
| BMOperator * | owner, | ||
| int | errcode, | ||
| const char * | msg | ||
| ) |
Definition at line 1577 of file bmesh_operators.c.
References BLI_addhead(), bm, bmo_error_messages, err, BMesh::errorstack, MEM_callocN, and BMOpError::msg.
Referenced by bmo_bisect_plane_exec(), bmo_bridge_loops_exec(), bmo_connect_verts_exec(), bmo_dissolve_faces_exec(), bmo_grid_fill_exec(), and bmo_subdivide_edgering_exec().
|
static |
ALLOC/FREE FLAG LAYER.
Used by operator stack to free/allocate private flag data. This is allocated using a mempool so the allocation/frees should be quite fast.
BMESH_TODO: Investigate not freeing flag layers until all operators have been executed. This would save a lot of realloc potentially.
Definition at line 1275 of file bmesh_operators.c.
References BMVert_OFlag::base, BMEdge_OFlag::base, BMFace_OFlag::base, BLI_mempool_calloc(), BLI_mempool_create(), BLI_mempool_destroy(), BLI_MEMPOOL_NOP, bm, BM_EDGE, BM_EDGES_OF_MESH, BM_ELEM_API_FLAG_CLEAR, BM_elem_index_set, BM_FACE, BM_FACES_OF_MESH, BM_ITER_MESH_INDEX, BM_VERT, BM_VERTS_OF_MESH, BMesh::elem_index_dirty, BMesh::etoolflagpool, BMesh::ftoolflagpool, BMVert_OFlag::oflags, BMEdge_OFlag::oflags, BMFace_OFlag::oflags, BMesh::totedge, BMesh::totface, BMesh::totflags, BMesh::totvert, and BMesh::vtoolflagpool.
Referenced by BMO_push().
|
static |
Definition at line 1397 of file bmesh_operators.c.
References BMVert_OFlag::base, BMEdge_OFlag::base, BMFace_OFlag::base, bm, BM_EDGE, BM_EDGES_OF_MESH, BM_elem_index_set, BM_FACE, BM_FACES_OF_MESH, BM_ITER_MESH_INDEX, BM_VERT, BM_VERTS_OF_MESH, BMesh::elem_index_dirty, BMVert_OFlag::oflags, BMEdge_OFlag::oflags, BMFace_OFlag::oflags, and BMesh::totflags.
Referenced by BMO_push().
|
static |
Definition at line 1337 of file bmesh_operators.c.
References BMVert_OFlag::base, BMEdge_OFlag::base, BMFace_OFlag::base, BLI_mempool_alloc(), BLI_mempool_create(), BLI_mempool_destroy(), BLI_MEMPOOL_NOP, bm, BM_EDGE, BM_EDGES_OF_MESH, BM_ELEM_API_FLAG_CLEAR, BM_elem_index_set, BM_FACE, BM_FACES_OF_MESH, BM_ITER_MESH_INDEX, BM_VERT, BM_VERTS_OF_MESH, BMesh::elem_index_dirty, BMesh::etoolflagpool, BMesh::ftoolflagpool, BMVert_OFlag::oflags, BMEdge_OFlag::oflags, BMFace_OFlag::oflags, BMesh::totedge, BMesh::totface, BMesh::totflags, BMesh::totvert, and BMesh::vtoolflagpool.
Referenced by BMO_pop().
| bool BMO_iter_map_value_bool | ( | BMOIter * | iter | ) |
Definition at line 1556 of file bmesh_operators.c.
References BLI_assert, BMO_OP_SLOT_SUBTYPE_MAP_BOOL, eBMOpSlotSubType_Union::map, BMOIter::slot, BMOpSlot::slot_subtype, and BMOIter::val.
Definition at line 1544 of file bmesh_operators.c.
References BLI_assert, BMO_OP_SLOT_SUBTYPE_MAP_FLT, eBMOpSlotSubType_Union::map, BMOIter::slot, BMOpSlot::slot_subtype, and BMOIter::val.
| int BMO_iter_map_value_int | ( | BMOIter * | iter | ) |
Definition at line 1550 of file bmesh_operators.c.
References BLI_assert, BMO_OP_SLOT_SUBTYPE_MAP_INT, eBMOpSlotSubType_Union::map, BMOIter::slot, BMOpSlot::slot_subtype, and BMOIter::val.
| 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.
| void* BMO_iter_map_value_ptr | ( | BMOIter * | iter | ) |
Definition at line 1536 of file bmesh_operators.c.
References BLI_assert, BMO_OP_SLOT_SUBTYPE_MAP_ELEM, BMO_OP_SLOT_SUBTYPE_MAP_INTERNAL, ELEM, eBMOpSlotSubType_Union::map, NULL, BMOIter::slot, BMOpSlot::slot_subtype, and BMOIter::val.
Referenced by bmo_extrude_edge_only_exec(), and bmo_extrude_face_region_exec().
| void* BMO_iter_new | ( | BMOIter * | iter, |
| BMOpSlot | slot_args[BMO_OP_MAX_SLOTS], | ||
| const char * | slot_name, | ||
| const char | restrictmask | ||
| ) |
New Iterator.
| restrictmask | restricts 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().
| void* BMO_iter_step | ( | BMOIter * | iter | ) |
Definition at line 1480 of file bmesh_operators.c.
References BLI_assert, BLI_ghashIterator_done(), BLI_ghashIterator_getKey(), BLI_ghashIterator_getValue_p(), BLI_ghashIterator_step(), BMO_OP_SLOT_ELEMENT_BUF, BMO_OP_SLOT_MAPPING, BMOpSlot::buf, BMOIter::cur, BMOpSlot::data, eBMOpSlotSubType_Union::elem, BMOIter::giter, BMHeader::htype, BMOpSlot::len, NULL, BMOIter::restrictmask, ret, BMOIter::slot, BMOpSlot::slot_subtype, BMOpSlot::slot_type, and BMOIter::val.
Referenced by bmo_extrude_edge_only_exec(), bmo_extrude_face_region_exec(), bmo_extrude_vert_indiv_exec(), BMO_iter_as_array(), BMO_iter_as_arrayN(), and BMO_iter_new().
| 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().
| 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().
|
static |
Definition at line 573 of file bmesh_operators.c.
References bm, BM_EDGE, BM_EDGES_OF_MESH, BM_FACE, BM_FACES_OF_MESH, BM_ITER_MESH, BM_VERT, BM_VERTS_OF_MESH, BMO_edge_flag_test_bool, BMO_face_flag_test_bool, BMO_vert_flag_test_bool, and oflag.
Referenced by BMO_mesh_disabled_flag_count(), and BMO_mesh_enabled_flag_count().
| void BMO_mesh_flag_disable_all | ( | BMesh * | bm, |
| BMOperator * | UNUSEDop, | ||
| const char | htype, | ||
| const short | oflag | ||
| ) |
Definition at line 621 of file bmesh_operators.c.
References bm, BM_EDGE, BM_EDGES_OF_MESH, BM_FACE, BM_FACES_OF_MESH, BM_ITER_MESH, BM_VERT, BM_VERTS_OF_MESH, BMO_edge_flag_disable, BMO_face_flag_disable, BMO_vert_flag_disable, and oflag.
| void BMO_mesh_selected_remap | ( | BMesh * | bm, |
| BMOpSlot * | slot_vert_map, | ||
| BMOpSlot * | slot_edge_map, | ||
| BMOpSlot * | slot_face_map, | ||
| const bool | check_select | ||
| ) |
Definition at line 649 of file bmesh_operators.c.
References BMesh::act_face, BLI_remlink(), bm, BM_EDGE, BM_elem_flag_test, BM_ELEM_SELECT, BM_VERT, BMEditSelection::ele, ListBase::first, BMEditSelection::htype, MEM_freeN, BMEditSelection::next, NULL, BMesh::selected, and UNLIKELY.
Referenced by bmo_mesh_copy().
|
static |
Definition at line 1630 of file bmesh_operators.c.
References MAX_SLOTNAME, and STREQLEN.
Referenced by bmo_name_to_slotcode_check(), and BMO_slot_exists().
|
static |
Definition at line 1645 of file bmesh_operators.c.
References bmo_name_to_slotcode().
Referenced by BMO_op_vinitf(), and BMO_slot_get().
| bool BMO_op_callf | ( | BMesh * | bm, |
| const int | flag, | ||
| const char * | fmt, | ||
| ... | |||
| ) |
Definition at line 2012 of file bmesh_operators.c.
References bm, BMO_op_exec(), BMO_op_finish(), BMO_op_vinitf(), and BMOpError::op.
Referenced by BKE_mesh_mirror_apply_mirror_on_axis(), BKE_mesh_remesh_voxel_fix_poles(), bm_mesh_edge_collapse_flagged(), bmo_collapse_exec(), bmo_create_circle_exec(), bmo_create_cone_exec(), bmo_create_uvsphere_exec(), bmo_dissolve_faces_exec(), bmo_edgenet_fill_exec(), bmo_extrude_discrete_faces_exec(), bmo_holes_fill_exec(), bmo_mirror_exec(), bmo_object_load_bmesh_exec(), bmo_rotate_exec(), bmo_scale_exec(), bmo_spin_exec(), bmo_symmetrize_exec(), bmo_translate_exec(), blender::nodes::create_cube_mesh(), blender::nodes::create_ico_sphere_mesh(), edbm_bridge_edge_loops_for_single_editmesh(), edbm_extrude_repeat_exec(), mesh_separate_tagged(), sculpt_gesture_trim_normals_update(), sculpt_symmetrize_exec(), skin_fix_hole_no_good_verts(), slice_paint_mask(), and unsubdivide_build_base_mesh_from_tags().
| 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().
| void BMO_op_finish | ( | BMesh * | bm, |
| BMOperator * | op | ||
| ) |
BMESH OPSTACK FINISH OP.
Does housekeeping chores related to finishing up an operator.
Definition at line 235 of file bmesh_operators.c.
References BMOperator::arena, BLI_memarena_free(), bm, BM_ELEM_INDEX_VALIDATE, bmo_op_slots_free(), bmo_opdefines, BMOpDefine::opname, BMOpDefine::slot_types_in, BMOpDefine::slot_types_out, BMOperator::slots_in, BMOperator::slots_out, and BMOperator::type.
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_op_vinitf(), 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_automerge(), EDBM_automerge_and_split(), edbm_bridge_edge_loops_for_single_editmesh(), edbm_extrude_ex(), EDBM_op_finish(), edbm_remove_doubles_exec(), EDBM_select_less(), EDBM_select_more(), lineart_geometry_object_load(), mesh_bisect_exec(), and skin_fix_hole_no_good_verts().
| void BMO_op_flag_disable | ( | BMesh * | UNUSEDbm, |
| BMOperator * | op, | ||
| const int | op_flag | ||
| ) |
Definition at line 79 of file bmesh_operators.c.
References BMOperator::flag.
| void BMO_op_flag_enable | ( | BMesh * | UNUSEDbm, |
| BMOperator * | op, | ||
| const int | op_flag | ||
| ) |
Definition at line 74 of file bmesh_operators.c.
References BMOperator::flag.
| void BMO_op_init | ( | BMesh * | bm, |
| BMOperator * | op, | ||
| const int | flag, | ||
| const char * | opname | ||
| ) |
BMESH OPSTACK INIT OP.
Initializes an operator structure to a certain type
Definition at line 171 of file bmesh_operators.c.
References BMOperator::arena, BLI_memarena_new(), BLI_MEMARENA_STD_BUFSIZE, BLI_memarena_use_calloc(), bm, BM_ELEM_INDEX_VALIDATE, bmo_op_slots_init(), BMO_opcode_from_opname(), bmo_opdefines, BMOpDefine::exec, BMOperator::exec, BMOperator::flag, BMOperator::slots_in, BMOperator::slots_out, BMOperator::type, BMOperator::type_flag, and BMOpDefine::type_flag.
Referenced by bm_bridge_splice_loops(), bm_vert_connect_pair(), bmo_collapse_exec(), bmo_mirror_exec(), BMO_op_vinitf(), bmo_pointmerge_exec(), bmo_remove_doubles_exec(), bmo_solidify_face_region_exec(), bmo_split_exec(), bmo_symmetrize_exec(), BPy_BMO_call(), EDBM_automerge(), EDBM_automerge_and_split(), edbm_extrude_ex(), lineart_geometry_object_load(), and skin_fix_hole_no_good_verts().
| bool BMO_op_initf | ( | BMesh * | bm, |
| BMOperator * | op, | ||
| const int | flag, | ||
| const char * | fmt, | ||
| ... | |||
| ) |
Definition at line 1997 of file bmesh_operators.c.
References bm, BMO_op_vinitf(), and BMOpError::op.
Referenced by BM_mesh_esubdivide(), 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_solidify_face_region_exec(), bmo_spin_exec(), bmo_symmetrize_exec(), bmo_triangle_fill_exec(), bridge_loop_pair(), build_hull(), collapse_face_corners(), EDBM_automerge(), edbm_bridge_edge_loops_for_single_editmesh(), EDBM_select_less(), EDBM_select_more(), lineart_geometry_object_load(), mesh_bisect_exec(), and skin_fix_hole_no_good_verts().
|
static |
Definition at line 150 of file bmesh_operators.c.
References BLI_ghash_free(), BMO_OP_SLOT_MAPPING, BMOpSlot::data, BMOpSlot::ghash, NULL, BMOpSlot::slot_type, and BMOSlotType::type.
Referenced by BMO_op_finish().
|
static |
Definition at line 121 of file bmesh_operators.c.
References BLI_ghash_ptr_new(), BMO_OP_SLOT_INT, BMO_OP_SLOT_MAPPING, BMO_OP_SLOT_SUBTYPE_INT_ENUM, BMO_OP_SLOT_SUBTYPE_INT_FLAG, BMOpSlot::data, ELEM, BMOpSlot::enum_data, BMOSlotType::enum_flags, BMOpSlot::ghash, BMOpSlot::i, eBMOpSlotSubType_Union::intg, BMOSlotType::name, BMOpSlot::slot_name, BMOpSlot::slot_subtype, BMOpSlot::slot_type, BMOSlotType::subtype, and BMOSlotType::type.
Referenced by BMO_op_init().
| 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:
Primitive Types
b - boolean (same as int but 1/0 only). BMO_OP_SLOT_BOOLi - int. BMO_OP_SLOT_INTf - float. BMO_OP_SLOT_FLTp - pointer (normally to a Scene/Mesh/Object/BMesh). BMO_OP_SLOT_PTRm3 - 3x3 matrix of floats. BMO_OP_SLOT_MATm4 - 4x4 matrix of floats. BMO_OP_SLOT_MATv - 3D vector of floats. BMO_OP_SLOT_VEC UtilityPass 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 vertsae - all edgesaf - all faceshv - 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)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().
| int BMO_opcode_from_opname | ( | const char * | opname | ) |
Definition at line 1658 of file bmesh_operators.c.
References bmo_opdefines, bmo_opdefines_total, and STREQ.
Referenced by BMO_op_init(), BMO_opcode_from_opname_check(), bpy_bmesh_op_doc_get(), and bpy_bmesh_ops_module_getattro().
|
static |
Definition at line 1671 of file bmesh_operators.c.
References BMO_opcode_from_opname().
Referenced by BMO_op_vinitf().
| 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().
| void BMO_push | ( | BMesh * | bm, |
| BMOperator * | UNUSEDop | ||
| ) |
BMESH OPSTACK PUSH.
Pushes the opstack down one level and allocates a new flag layer if appropriate.
Definition at line 89 of file bmesh_operators.c.
References BLI_assert, bm, bmo_flag_layer_alloc(), bmo_flag_layer_clear(), BMesh::toolflag_index, and BMesh::totflags.
Referenced by BMO_op_exec().
| void* BMO_slot_as_arrayN | ( | BMOpSlot | slot_args[BMO_OP_MAX_SLOTS], |
| const char * | slot_name, | ||
| int * | len | ||
| ) |
Definition at line 530 of file bmesh_operators.c.
References BLI_assert, BMO_OP_SLOT_ELEMENT_BUF, BMO_slot_get(), BMOpSlot::buf, BMOpSlot::data, BMOpSlot::len, len, MEM_mallocN, ret, and BMOpSlot::slot_type.
| bool BMO_slot_bool_get | ( | BMOpSlot | slot_args[BMO_OP_MAX_SLOTS], |
| const char * | slot_name | ||
| ) |
Definition at line 518 of file bmesh_operators.c.
References BLI_assert, BMO_OP_SLOT_BOOL, BMO_slot_get(), BMOpSlot::data, BMOpSlot::i, and BMOpSlot::slot_type.
Referenced by bmo_beautify_fill_exec(), bmo_bevel_exec(), bmo_bisect_plane_exec(), bmo_bridge_loops_exec(), bmo_collapse_exec(), bmo_connect_verts_exec(), bmo_contextual_create_exec(), bmo_create_circle_exec(), bmo_create_cone_exec(), bmo_create_cube_exec(), bmo_create_grid_exec(), bmo_create_icosphere_exec(), bmo_create_monkey_exec(), bmo_create_uvsphere_exec(), bmo_dissolve_edges_exec(), bmo_dissolve_faces_exec(), bmo_dissolve_limit_exec(), bmo_dissolve_verts_exec(), bmo_edgeloop_fill_exec(), bmo_edgenet_fill_exec(), bmo_extrude_discrete_faces_exec(), bmo_extrude_edge_only_exec(), bmo_extrude_face_region_exec(), bmo_extrude_vert_indiv_exec(), bmo_face_attribute_fill_exec(), bmo_grid_fill_exec(), bmo_inset_individual_exec(), bmo_inset_region_exec(), bmo_join_triangles_exec(), bmo_mesh_copy(), bmo_mesh_to_bmesh_exec(), bmo_mirror_exec(), bmo_offset_edgeloops_exec(), bmo_poke_exec(), bmo_region_extend_exec(), bmo_reverse_faces_exec(), bmo_rotate_colors_exec(), bmo_rotate_edges_exec(), bmo_rotate_uvs_exec(), bmo_smooth_laplacian_vert_exec(), bmo_smooth_vert_exec(), bmo_spin_exec(), bmo_split_edges_exec(), bmo_split_exec(), bmo_subdivide_edges_exec(), bmo_transform_exec(), bmo_triangle_fill_exec(), and bmo_wireframe_exec().
| void BMO_slot_bool_set | ( | BMOpSlot | slot_args[BMO_OP_MAX_SLOTS], |
| const char * | slot_name, | ||
| const bool | i | ||
| ) |
Definition at line 396 of file bmesh_operators.c.
References BLI_assert, BMO_OP_SLOT_BOOL, BMO_slot_get(), BMOpSlot::data, BMOpSlot::i, and BMOpSlot::slot_type.
Referenced by BMO_op_vinitf(), bmo_solidify_face_region_exec(), edbm_extrude_ex(), and edbm_knife_cut_exec().
| void* BMO_slot_buffer_alloc | ( | BMOperator * | op, |
| BMOpSlot | slot_args[BMO_OP_MAX_SLOTS], | ||
| const char * | slot_name, | ||
| const int | len | ||
| ) |
Definition at line 787 of file bmesh_operators.c.
References BMOperator::arena, BLI_memarena_alloc(), BMO_OP_SLOT_ELEMENT_BUF, BMO_OPSLOT_TYPEINFO, BMO_slot_get(), BMOpSlot::buf, BMOpSlot::data, BMOpSlot::len, len, NULL, and BMOpSlot::slot_type.
Referenced by bm_vert_connect_pair(), bmo_create_grid_exec(), BMO_slot_buffer_from_all(), bmo_slot_buffer_from_flag(), bmo_slot_buffer_from_hflag(), and bpy_slot_from_py().
| int BMO_slot_buffer_count | ( | BMOpSlot | slot_args[BMO_OP_MAX_SLOTS], |
| const char * | slot_name | ||
| ) |
Definition at line 692 of file bmesh_operators.c.
References BLI_assert, BMO_OP_SLOT_ELEMENT_BUF, BMO_slot_get(), BMOpSlot::len, and BMOpSlot::slot_type.
Referenced by bmo_beautify_fill_exec(), bmo_bisect_plane_exec(), bmo_contextual_create_exec(), bmo_edgeloop_fill_exec(), bmo_edgenet_fill_exec(), bmo_face_attribute_fill_exec(), bmo_holes_fill_exec(), BMO_iter_as_arrayN(), bmo_offset_edgeloops_exec(), bmo_planar_faces_exec(), bmo_rotate_edges_exec(), bmo_smooth_vert_exec(), bmo_triangle_fill_exec(), edbm_add_edge_face_exec(), and edbm_edge_rotate_selected_exec().
| 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.
Removes flags from elements in a slots buffer
Definition at line 1240 of file bmesh_operators.c.
References BLI_assert, bm, BM_ALL_NOLOOP, BMO_elem_flag_disable, BMO_OP_SLOT_ELEMENT_BUF, BMO_slot_get(), BMOpSlot::buf, BMOpSlot::data, data, eBMOpSlotSubType_Union::elem, BMOpSlot::len, oflag, BMOpSlot::slot_subtype, and BMOpSlot::slot_type.
| 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.
Flags elements in a slots buffer
Definition at line 1213 of file bmesh_operators.c.
References BLI_assert, bm, BM_ALL_NOLOOP, BMO_elem_flag_enable, BMO_OP_SLOT_ELEMENT_BUF, BMO_slot_get(), BMOpSlot::data, data, eBMOpSlotSubType_Union::elem, BMOpSlot::len, oflag, BMOpSlot::p, BMOpSlot::slot_subtype, and BMOpSlot::slot_type.
Referenced by bmesh_find_doubles_common(), bmo_bisect_plane_exec(), bmo_bridge_loops_exec(), bmo_collapse_exec(), bmo_collapse_uvs_exec(), bmo_connect_vert_pair_exec(), bmo_connect_verts_exec(), bmo_contextual_create_exec(), bmo_create_icosphere_exec(), bmo_create_uvsphere_exec(), bmo_delete_exec(), bmo_dissolve_degenerate_exec(), bmo_dissolve_edges_exec(), bmo_dissolve_faces_exec(), bmo_duplicate_exec(), bmo_edgenet_prepare_exec(), bmo_extrude_face_region_exec(), bmo_grid_fill_exec(), bmo_mirror_exec(), bmo_recalc_face_normals_exec(), bmo_region_extend_exec(), bmo_solidify_face_region_exec(), bmo_split_exec(), bmo_subdivide_edgering_exec(), bmo_subdivide_edges_exec(), bmo_symmetrize_exec(), bmo_triangle_fill_exec(), and bridge_loop_pair().
| 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().
| void BMO_slot_buffer_from_array | ( | BMOperator * | op, |
| BMOpSlot * | slot, | ||
| BMHeader ** | ele_buffer, | ||
| int | ele_buffer_len | ||
| ) |
Definition at line 975 of file bmesh_operators.c.
References BMOperator::arena, BLI_assert, BLI_memarena_alloc(), BMO_ASSERT_SLOT_IN_OP, BMO_OP_SLOT_ELEMENT_BUF, BMOpSlot::buf, BMOpSlot::data, ELEM, BMOpSlot::len, NULL, and BMOpSlot::slot_type.
Referenced by BMO_op_vinitf().
| 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().
| 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().
| 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 | ||
| ) |
Definition at line 1109 of file bmesh_operators.c.
References bm, bmo_slot_buffer_from_flag(), and oflag.
Referenced by bmo_beautify_fill_exec(), bmo_bisect_edges_exec(), bmo_bisect_plane_exec(), bmo_bridge_loops_exec(), bmo_connect_verts_concave_exec(), bmo_connect_verts_exec(), bmo_connect_verts_nonplanar_exec(), bmo_contextual_create_exec(), bmo_create_circle_exec(), bmo_create_cone_exec(), bmo_create_cube_exec(), bmo_create_icosphere_exec(), bmo_create_monkey_exec(), bmo_create_uvsphere_exec(), bmo_create_vert_exec(), bmo_dissolve_faces_exec(), bmo_dissolve_limit_exec(), bmo_duplicate_exec(), bmo_edgeloop_fill_exec(), bmo_edgenet_prepare_exec(), bmo_extrude_discrete_faces_exec(), bmo_extrude_edge_only_exec(), bmo_extrude_vert_indiv_exec(), bmo_grid_fill_exec(), bmo_inset_individual_exec(), bmo_inset_region_exec(), bmo_join_triangles_exec(), bmo_mirror_exec(), bmo_offset_edgeloops_exec(), BMO_op_vinitf(), bmo_poke_exec(), bmo_region_extend_exec(), bmo_rotate_edges_exec(), bmo_subdivide_edgering_exec(), bmo_subdivide_edges_exec(), bmo_symmetrize_exec(), bmo_triangle_fill_exec(), and edbm_knife_cut_exec().
| 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 | ||
| ) |
Definition at line 941 of file bmesh_operators.c.
References bm, and bmo_slot_buffer_from_hflag().
Referenced by bmo_bevel_exec(), bmo_edgenet_fill_exec(), bmo_face_attribute_fill_exec(), bmo_holes_fill_exec(), BMO_op_vinitf(), bmo_split_edges_exec(), bmo_triangulate_exec(), bmo_wireframe_exec(), edbm_extrude_ex(), and edbm_inset_calc().
|
static |
BMO_FLAG_TO_SLOT.
Copies elements of a certain type, which have a certain flag set into an output slot for an operator.
Definition at line 1042 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_edge_flag_test_bool, BMO_face_flag_test_bool, BMO_mesh_disabled_flag_count(), BMO_mesh_enabled_flag_count(), BMO_OP_SLOT_ELEMENT_BUF, BMO_OP_SLOT_SUBTYPE_ELEM_IS_SINGLE, BMO_slot_buffer_alloc(), BMO_slot_get(), BMO_vert_flag_test_bool, BMOpSlot::buf, BMOpSlot::data, eBMOpSlotSubType_Union::elem, if(), BMOpSlot::len, oflag, BMOpSlot::slot_subtype, BMOpSlot::slot_type, BMOperator::slots_in, and BMOperator::slots_out.
Referenced by BMO_slot_buffer_from_disabled_flag(), and BMO_slot_buffer_from_enabled_flag().
|
static |
BMO_HEADERFLAG_TO_SLOT.
Copies elements of a certain type, which have a certain header flag enabled/disabled into a slot for an operator.
Definition at line 874 of file bmesh_operators.c.
References BLI_assert, bm, BM_ALL_NOLOOP, BM_EDGE, BM_EDGES_OF_MESH, BM_elem_flag_test, BM_elem_flag_test_bool, BM_ELEM_HIDDEN, BM_FACE, BM_FACES_OF_MESH, BM_ITER_MESH, BM_mesh_elem_hflag_count_disabled(), BM_mesh_elem_hflag_count_enabled(), BM_VERT, BM_VERTS_OF_MESH, BMO_FLAG_RESPECT_HIDE, BMO_OP_SLOT_ELEMENT_BUF, BMO_OP_SLOT_SUBTYPE_ELEM_IS_SINGLE, BMO_slot_buffer_alloc(), BMO_slot_get(), BMOperator::flag, and output.
Referenced by BMO_slot_buffer_from_disabled_hflag(), and BMO_slot_buffer_from_enabled_hflag().
| void BMO_slot_buffer_from_single | ( | BMOperator * | op, |
| BMOpSlot * | slot, | ||
| BMHeader * | ele | ||
| ) |
Definition at line 961 of file bmesh_operators.c.
References BMOperator::arena, BLI_assert, BLI_memarena_alloc(), BMO_ASSERT_SLOT_IN_OP, BMO_OP_SLOT_ELEMENT_BUF, BMO_OP_SLOT_SUBTYPE_ELEM_IS_SINGLE, BMOpSlot::buf, BMOpSlot::data, ELEM, eBMOpSlotSubType_Union::elem, BMHeader::htype, BMOpSlot::len, BMOpSlot::slot_subtype, and BMOpSlot::slot_type.
Referenced by BMO_op_vinitf(), and bpy_slot_from_py().
| void* BMO_slot_buffer_get_first | ( | BMOpSlot | slot_args[BMO_OP_MAX_SLOTS], |
| const char * | slot_name | ||
| ) |
Definition at line 1437 of file bmesh_operators.c.
References BMO_OP_SLOT_ELEMENT_BUF, BMO_slot_get(), BMOpSlot::buf, BMOpSlot::data, NULL, and BMOpSlot::slot_type.
Referenced by edbm_add_edge_face_exec().
| void* BMO_slot_buffer_get_single | ( | BMOpSlot * | slot | ) |
Definition at line 992 of file bmesh_operators.c.
References BLI_assert, BMO_OP_SLOT_ELEMENT_BUF, BMO_OP_SLOT_SUBTYPE_ELEM_IS_SINGLE, BMOpSlot::buf, BMOpSlot::data, ELEM, eBMOpSlotSubType_Union::elem, BMOpSlot::len, NULL, BMOpSlot::slot_subtype, and BMOpSlot::slot_type.
Referenced by bmo_pointmerge_facedata_exec(), and bpy_slot_to_py().
| 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.
Removes flags from elements in a slots buffer, automatically using the selection API where appropriate.
Definition at line 1175 of file bmesh_operators.c.
References BLI_assert, bm, BM_ALL_NOLOOP, BM_elem_flag_disable, BM_ELEM_HIDDEN, BM_elem_hide_set, BM_ELEM_SELECT, BM_elem_select_set(), BMO_OP_SLOT_ELEMENT_BUF, BMO_slot_get(), BMOpSlot::buf, BMOpSlot::data, data, eBMOpSlotSubType_Union::elem, BMOpSlot::len, BMOpSlot::slot_subtype, and BMOpSlot::slot_type.
Referenced by bmo_inset_region_exec(), edbm_add_edge_face_exec(), edbm_edge_rotate_selected_exec(), edbm_extrude_verts_indiv(), EDBM_select_less(), and edbm_solidify_exec().
| 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.
Header Flags elements in a slots buffer, automatically using the selection API where appropriate.
Definition at line 1135 of file bmesh_operators.c.
References BLI_assert, bm, BM_ALL_NOLOOP, BM_elem_flag_enable, BM_ELEM_HIDDEN, BM_elem_hide_set, BM_ELEM_SELECT, BM_elem_select_set(), BMO_OP_SLOT_ELEMENT_BUF, BMO_OP_SLOT_SUBTYPE_ELEM_IS_SINGLE, BMO_slot_get(), BMOpSlot::buf, BMOpSlot::data, data, eBMOpSlotSubType_Union::elem, BMOpSlot::len, BMOpSlot::slot_subtype, and BMOpSlot::slot_type.
Referenced by BM_mesh_esubdivide(), bm_vert_connect_pair(), bmo_bisect_plane_exec(), bmo_edgenet_fill_exec(), bmo_face_attribute_fill_exec(), bmo_holes_fill_exec(), bmo_inset_individual_exec(), bmo_inset_region_exec(), bmo_split_edges_exec(), bmo_triangulate_exec(), bmo_wireframe_exec(), bridge_loop_pair(), edbm_add_edge_face_exec(), edbm_bevel_calc(), edbm_bridge_edge_loops_for_single_editmesh(), edbm_connect_vert_pair(), edbm_duplicate_exec(), edbm_edge_rotate_selected_exec(), edbm_extrude_edges_indiv(), edbm_extrude_verts_indiv(), edbm_fill_exec(), edbm_fill_grid_exec(), edbm_inset_calc(), edbm_offset_edgeloop_exec(), EDBM_op_call_and_selectf(), edbm_poke_face_exec(), edbm_quads_convert_to_tris_exec(), edbm_screw_exec(), EDBM_select_more(), edbm_solidify_exec(), edbm_spin_exec(), edbm_split_exec(), edbm_wireframe_exec(), mesh_bisect_exec(), and mesh_symmetrize_exec().
| bool BMO_slot_exists | ( | BMOpSlot | slot_args[BMO_OP_MAX_SLOTS], |
| const char * | identifier | ||
| ) |
BMESH OPSTACK HAS SLOT.
Definition at line 257 of file bmesh_operators.c.
References bmo_name_to_slotcode().
Referenced by bmesh_find_doubles_common(), and BPy_BMO_call().
Definition at line 496 of file bmesh_operators.c.
References BLI_assert, BMO_OP_SLOT_FLT, BMO_slot_get(), BMOpSlot::data, BMOpSlot::f, and BMOpSlot::slot_type.
Referenced by bmesh_find_doubles_common(), bmo_bevel_exec(), bmo_bisect_plane_exec(), bmo_bridge_loops_exec(), bmo_connect_verts_nonplanar_exec(), bmo_create_circle_exec(), bmo_create_cone_exec(), bmo_create_cube_exec(), bmo_create_grid_exec(), bmo_create_icosphere_exec(), bmo_create_uvsphere_exec(), bmo_dissolve_degenerate_exec(), bmo_dissolve_limit_exec(), bmo_inset_individual_exec(), bmo_inset_region_exec(), bmo_join_triangles_exec(), bmo_mirror_exec(), bmo_planar_faces_exec(), bmo_poke_exec(), bmo_smooth_laplacian_vert_exec(), bmo_smooth_vert_exec(), bmo_solidify_face_region_exec(), bmo_spin_exec(), bmo_subdivide_edgering_exec(), bmo_subdivide_edges_exec(), bmo_symmetrize_exec(), and bmo_wireframe_exec().
| void BMO_slot_float_set | ( | BMOpSlot | slot_args[BMO_OP_MAX_SLOTS], |
| const char * | slot_name, | ||
| const float | f | ||
| ) |
Definition at line 374 of file bmesh_operators.c.
References BLI_assert, BMO_OP_SLOT_FLT, BMO_slot_get(), BMOpSlot::data, BMOpSlot::f, and BMOpSlot::slot_type.
Referenced by BMO_op_vinitf(), and edbm_knife_cut_exec().
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().
| int BMO_slot_int_get | ( | BMOpSlot | slot_args[BMO_OP_MAX_SLOTS], |
| const char * | slot_name | ||
| ) |
Definition at line 507 of file bmesh_operators.c.
References BLI_assert, BMO_OP_SLOT_INT, BMO_slot_get(), BMOpSlot::data, BMOpSlot::i, and BMOpSlot::slot_type.
Referenced by bmo_beautify_fill_exec(), bmo_bevel_exec(), bmo_bisect_edges_exec(), bmo_bridge_loops_exec(), bmo_contextual_create_exec(), bmo_create_circle_exec(), bmo_create_cone_exec(), bmo_create_grid_exec(), bmo_create_icosphere_exec(), bmo_create_uvsphere_exec(), bmo_delete_exec(), bmo_dissolve_limit_exec(), bmo_edgeloop_fill_exec(), bmo_edgenet_fill_exec(), bmo_grid_fill_exec(), bmo_holes_fill_exec(), bmo_mirror_exec(), bmo_planar_faces_exec(), bmo_poke_exec(), bmo_spin_exec(), bmo_subdivide_edgering_exec(), bmo_subdivide_edges_exec(), bmo_symmetrize_exec(), bmo_triangulate_exec(), and bmo_unsubdivide_exec().
| void BMO_slot_int_set | ( | BMOpSlot | slot_args[BMO_OP_MAX_SLOTS], |
| const char * | slot_name, | ||
| const int | i | ||
| ) |
Definition at line 385 of file bmesh_operators.c.
References BLI_assert, BMO_OP_SLOT_INT, BMO_slot_get(), BMOpSlot::data, BMOpSlot::i, and BMOpSlot::slot_type.
Referenced by BMO_op_vinitf(), and edbm_knife_cut_exec().
| int BMO_slot_map_count | ( | BMOpSlot | slot_args[BMO_OP_MAX_SLOTS], |
| const char * | slot_name | ||
| ) |
Definition at line 705 of file bmesh_operators.c.
References BLI_assert, BLI_ghash_len(), BMO_OP_SLOT_MAPPING, BMO_slot_get(), BMOpSlot::data, BMOpSlot::ghash, and BMOpSlot::slot_type.
Referenced by bmo_extrude_face_region_exec().
| void BMO_slot_map_insert | ( | BMOperator * | op, |
| BMOpSlot * | slot, | ||
| const void * | element, | ||
| const void * | data | ||
| ) |
Definition at line 715 of file bmesh_operators.c.
References BLI_assert, BLI_ghash_insert(), BMO_ASSERT_SLOT_IN_OP, BMO_OP_SLOT_MAPPING, BMOpSlot::data, data, element, BMOpSlot::ghash, and BMOpSlot::slot_type.
Referenced by BMO_slot_map_bool_insert(), BMO_slot_map_elem_insert(), BMO_slot_map_empty_insert(), BMO_slot_map_float_insert(), BMO_slot_map_int_insert(), and BMO_slot_map_ptr_insert().
| 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 | ||
| ) |
Definition at line 767 of file bmesh_operators.c.
References BLI_assert, BLI_ghashIterator_getKey(), bm, BMO_elem_flag_enable, BMO_OP_SLOT_MAPPING, BMO_slot_get(), BMOpSlot::data, BMOpSlot::ghash, GHASH_ITER, BMElemF::head, BMHeader::htype, oflag, and BMOpSlot::slot_type.
Referenced by bmo_bisect_edges_exec(), and bmo_subdivide_edges_exec().
| void BMO_slot_mat3_get | ( | BMOpSlot | slot_args[BMO_OP_MAX_SLOTS], |
| const char * | slot_name, | ||
| float | r_mat[3][3] | ||
| ) |
Definition at line 454 of file bmesh_operators.c.
References BLI_assert, BMO_OP_SLOT_MAT, BMO_SLOT_AS_MATRIX, BMO_slot_get(), copy_m3_m4(), BMOpSlot::data, BMOpSlot::p, BMOpSlot::slot_type, and unit_m3().
| void BMO_slot_mat4_get | ( | BMOpSlot | slot_args[BMO_OP_MAX_SLOTS], |
| const char * | slot_name, | ||
| float | r_mat[4][4] | ||
| ) |
Definition at line 436 of file bmesh_operators.c.
References BLI_assert, BMO_OP_SLOT_MAT, BMO_SLOT_AS_MATRIX, BMO_slot_get(), copy_m4_m4(), BMOpSlot::data, BMOpSlot::p, BMOpSlot::slot_type, and unit_m4().
Referenced by bmo_create_circle_exec(), bmo_create_cone_exec(), bmo_create_cube_exec(), bmo_create_grid_exec(), bmo_create_icosphere_exec(), bmo_create_monkey_exec(), bmo_create_uvsphere_exec(), bmo_rotate_exec(), and bmo_transform_exec().
| void BMO_slot_mat_set | ( | BMOperator * | op, |
| BMOpSlot | slot_args[BMO_OP_MAX_SLOTS], | ||
| const char * | slot_name, | ||
| const float * | mat, | ||
| int | size | ||
| ) |
Definition at line 408 of file bmesh_operators.c.
References BMOperator::arena, BLI_assert, BLI_memarena_alloc(), BMO_OP_SLOT_MAT, BMO_slot_get(), copy_m4_m3(), copy_m4_m4(), BMOpSlot::data, BMOpSlot::len, BMOpSlot::p, size(), BMOpSlot::slot_type, and zero_m4().
Referenced by BMO_op_vinitf(), and bpy_slot_from_py().
| void* BMO_slot_ptr_get | ( | BMOpSlot | slot_args[BMO_OP_MAX_SLOTS], |
| const char * | slot_name | ||
| ) |
Definition at line 544 of file bmesh_operators.c.
References BLI_assert, BMO_OP_SLOT_PTR, BMO_slot_get(), BMOpSlot::data, NULL, BMOpSlot::p, and BMOpSlot::slot_type.
Referenced by bmo_bevel_exec(), bmo_bmesh_to_mesh_exec(), bmo_duplicate_exec(), bmo_mesh_to_bmesh_exec(), and bmo_object_load_bmesh_exec().
| void BMO_slot_ptr_set | ( | BMOpSlot | slot_args[BMO_OP_MAX_SLOTS], |
| const char * | slot_name, | ||
| void * | p | ||
| ) |
Definition at line 472 of file bmesh_operators.c.
References BLI_assert, BMO_OP_SLOT_PTR, BMO_slot_get(), BMOpSlot::data, BMOpSlot::p, and BMOpSlot::slot_type.
Referenced by BMO_op_vinitf().
| void BMO_slot_vec_get | ( | BMOpSlot | slot_args[BMO_OP_MAX_SLOTS], |
| const char * | slot_name, | ||
| float | r_vec[3] | ||
| ) |
Definition at line 555 of file bmesh_operators.c.
References BLI_assert, BMO_OP_SLOT_VEC, BMO_slot_get(), copy_v3_v3(), BMOpSlot::data, BMOpSlot::slot_type, and BMOpSlot::vec.
Referenced by bmo_bisect_plane_exec(), bmo_create_vert_exec(), bmo_pointmerge_exec(), bmo_rotate_exec(), bmo_scale_exec(), bmo_spin_exec(), bmo_translate_exec(), and bmo_triangle_fill_exec().
| void BMO_slot_vec_set | ( | BMOpSlot | slot_args[BMO_OP_MAX_SLOTS], |
| const char * | slot_name, | ||
| const float | vec[3] | ||
| ) |
Definition at line 483 of file bmesh_operators.c.
References BLI_assert, BMO_OP_SLOT_VEC, BMO_slot_get(), copy_v3_v3(), BMOpSlot::data, BMOpSlot::slot_type, and BMOpSlot::vec.
Referenced by BMO_op_vinitf().
|
static |
Definition at line 45 of file bmesh_operators.c.
Referenced by BMO_error_raise().
| const int BMO_OPSLOT_TYPEINFO[BMO_OP_SLOT_TOTAL_TYPES] |
Definition at line 57 of file bmesh_operators.c.
Referenced by _bmo_slot_buffer_append(), _bmo_slot_copy(), and BMO_slot_buffer_alloc().