Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_alloca.h"
#include "BLI_kdtree.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_stack.h"
#include "BLI_utildefines_stack.h"
#include "BKE_customdata.h"
#include "bmesh.h"
#include "intern/bmesh_operators_private.h"
Go to the source code of this file.
Macros | |
#define | ELE_DEL 1 |
#define | EDGE_COL 2 |
#define | VERT_IN_FACE 4 |
#define | LOOP_MAP_VERT_INIT(l_init, v_map, is_del) |
#define | VERT_KEEP 8 |
#define | EDGE_MARK 1 |
Functions | |
static void | remdoubles_splitface (BMFace *f, BMesh *bm, BMOperator *op, BMOpSlot *slot_targetmap) |
static BMFace * | remdoubles_createface (BMesh *bm, BMFace *f, BMOpSlot *slot_targetmap, bool *r_created) |
void | bmo_weld_verts_exec (BMesh *bm, BMOperator *op) |
void | bmo_pointmerge_facedata_exec (BMesh *bm, BMOperator *op) |
void | bmo_average_vert_facedata_exec (BMesh *bm, BMOperator *op) |
void | bmo_pointmerge_exec (BMesh *bm, BMOperator *op) |
void | bmo_collapse_exec (BMesh *bm, BMOperator *op) |
static void | bmo_collapsecon_do_layer (BMesh *bm, const int layer, const short oflag) |
void | bmo_collapse_uvs_exec (BMesh *bm, BMOperator *op) |
static void | bmesh_find_doubles_common (BMesh *bm, BMOperator *op, BMOperator *optarget, BMOpSlot *optarget_slot) |
void | bmo_remove_doubles_exec (BMesh *bm, BMOperator *op) |
void | bmo_find_doubles_exec (BMesh *bm, BMOperator *op) |
Welding and merging functionality.
Definition in file bmo_removedoubles.c.
#define EDGE_COL 2 |
Definition at line 56 of file bmo_removedoubles.c.
#define EDGE_MARK 1 |
Definition at line 317 of file bmo_removedoubles.c.
#define ELE_DEL 1 |
Definition at line 55 of file bmo_removedoubles.c.
#define LOOP_MAP_VERT_INIT | ( | l_init, | |
v_map, | |||
is_del | |||
) |
#define VERT_IN_FACE 4 |
Definition at line 57 of file bmo_removedoubles.c.
#define VERT_KEEP 8 |
Definition at line 315 of file bmo_removedoubles.c.
|
static |
Definition at line 613 of file bmo_removedoubles.c.
References BLI_assert, bm, BM_VERT, BMO_iter_new(), BMO_slot_buffer_flag_enable(), BMO_slot_exists(), BMO_slot_float_get(), BMO_slot_get(), BMO_slot_map_elem_insert(), BMO_vert_flag_test, BMOpSlot::buf, BMOpSlot::data, ELEM, BMOpSlot::len, MEM_freeN, MEM_mallocN, NULL, BMOperator::slots_in, tree, VERT_KEEP, and verts.
Referenced by bmo_find_doubles_exec(), and bmo_remove_doubles_exec().
void bmo_average_vert_facedata_exec | ( | BMesh * | bm, |
BMOperator * | op | ||
) |
Definition at line 370 of file bmo_removedoubles.c.
References bm, BM_ELEM_CD_GET_VOID_P, BM_ITER_ELEM, BM_LOOPS_OF_VERT, BM_VERT, BMO_ITER, CustomData_data_add(), CustomData_data_copy_value(), CustomData_data_dominmax(), CustomData_data_initminmax(), CustomData_data_multiply(), CustomData_layer_has_math(), l, CustomData::layers, BMesh::ldata, max, min, offset, CustomDataLayer::offset, BMOperator::slots_in, CustomData::totlayer, type, CustomDataLayer::type, and v.
void bmo_collapse_exec | ( | BMesh * | bm, |
BMOperator * | op | ||
) |
Definition at line 438 of file bmo_removedoubles.c.
References add_v3_v3(), BLI_assert, BLI_stack_free(), BLI_stack_is_empty(), BLI_stack_new, BLI_stack_peek(), BLI_stack_pop(), BLI_stack_push(), bm, BM_EDGE, BM_EDGES_OF_MESH, BM_elem_flag_disable, BM_elem_flag_enable, BM_elem_flag_test, BM_ELEM_TAG, BM_ITER_MESH, BMO_edge_flag_test, BMO_op_callf(), BMO_op_exec(), BMO_op_finish(), BMO_op_init(), BMO_slot_bool_get(), BMO_slot_buffer_flag_enable(), BMO_slot_get(), BMO_slot_map_elem_insert(), BMW_begin(), BMW_end(), BMW_FLAG_NOP, BMW_init(), BMW_MASK_NOP, BMW_NIL_LAY, BMW_step(), BMW_VERT_SHELL, center, BMVert::co, copy_v3_v3(), count, e, EDGE_MARK, BMOperator::flag, mul_v3_fl(), BMOperator::slots_in, and zero_v3().
void bmo_collapse_uvs_exec | ( | BMesh * | bm, |
BMOperator * | op | ||
) |
Definition at line 582 of file bmo_removedoubles.c.
References BLI_assert, bm, BM_EDGE, BM_EDGES_OF_MESH, BM_iter_mesh_count_flag(), bmo_collapsecon_do_layer(), BMO_slot_buffer_flag_enable(), CustomData_has_math(), CustomData_layer_has_math(), EDGE_MARK, BMesh::ldata, oflag, BMOperator::slots_in, and CustomData::totlayer.
Definition at line 526 of file bmo_removedoubles.c.
References BLI_assert, BLI_stack_free(), BLI_stack_is_empty(), BLI_stack_new, BLI_stack_pop(), BLI_stack_push(), bm, BM_ELEM_CD_GET_VOID_P, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BMO_edge_flag_test, BMW_begin(), BMW_end(), BMW_FLAG_NOP, BMW_init(), BMW_LOOPDATA_ISLAND, BMW_MASK_NOP, BMW_step(), CustomData_data_add(), CustomData_data_copy_value(), CustomData_data_dominmax(), CustomData_data_initminmax(), CustomData_data_multiply(), BMLoop::e, l, CustomData::layers, BMesh::ldata, max, min, offset, CustomDataLayer::offset, oflag, type, and CustomDataLayer::type.
Referenced by bmo_collapse_uvs_exec().
void bmo_find_doubles_exec | ( | BMesh * | bm, |
BMOperator * | op | ||
) |
Definition at line 688 of file bmo_removedoubles.c.
References bm, bmesh_find_doubles_common(), BMO_slot_get(), and BMOperator::slots_out.
void bmo_pointmerge_exec | ( | BMesh * | bm, |
BMOperator * | op | ||
) |
Definition at line 409 of file bmo_removedoubles.c.
References bm, BM_VERT, BMO_ITER, BMO_op_exec(), BMO_op_finish(), BMO_op_init(), BMO_slot_get(), BMO_slot_map_elem_insert(), BMO_slot_vec_get(), BMVert::co, copy_v3_v3(), BMOperator::flag, NULL, BMOperator::slots_in, and v.
void bmo_pointmerge_facedata_exec | ( | BMesh * | bm, |
BMOperator * | op | ||
) |
Definition at line 319 of file bmo_removedoubles.c.
References bm, BM_ELEM_CD_GET_VOID_P, BM_ITER_ELEM, BM_LOOPS_OF_VERT, BM_VERT, BM_vert_face_count(), BMO_ITER, BMO_slot_buffer_get_single(), BMO_slot_get(), CustomData_bmesh_copy_data(), CustomData_data_add(), CustomData_data_multiply(), CustomData_layer_has_math(), BMHeader::data, BMLoop::head, l, CustomData::layers, BMesh::ldata, NULL, offset, CustomDataLayer::offset, BMOperator::slots_in, CustomData::totlayer, type, CustomDataLayer::type, and v.
void bmo_remove_doubles_exec | ( | BMesh * | bm, |
BMOperator * | op | ||
) |
Definition at line 676 of file bmo_removedoubles.c.
References bm, bmesh_find_doubles_common(), BMO_op_exec(), BMO_op_finish(), BMO_op_init(), BMO_slot_get(), BMOperator::flag, and BMOperator::slots_in.
void bmo_weld_verts_exec | ( | BMesh * | bm, |
BMOperator * | op | ||
) |
Definition at line 177 of file bmo_removedoubles.c.
References BMesh::act_face, BLI_assert, BLI_ghash_free(), BLI_ghash_insert(), BLI_ghash_ptr_new(), BLI_listbase_is_empty(), bm, BM_CREATE_NOP, BM_edge_create(), BM_edge_exists(), BM_EDGES_OF_MESH, BM_elem_flag_merge_ex, BM_ELEM_HIDDEN, BM_face_kill(), BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_select_history_merge_from_targetmap(), BM_VERTS_OF_MESH, bmesh_face_swap_data(), BMO_edge_flag_enable, BMO_edge_flag_test, BMO_face_flag_disable, BMO_face_flag_enable, BMO_mesh_delete_oflag_context(), BMO_slot_get(), BMO_vert_flag_enable, BMO_vert_flag_test, BMO_vert_flag_test_bool, DEL_ONLYTAGGED, BMLoop::e, e, EDGE_COL, ELE_DEL, l, BMFace::len, NULL, oflags, remdoubles_createface(), remdoubles_splitface(), BMesh::selected, BMOperator::slots_in, SWAP, BMesh::use_toolflags, BMLoop::v, v, v1, and v2.
|
static |
helper function for bmo_weld_verts_exec so we can use stack memory
Definition at line 62 of file bmo_removedoubles.c.
References BLI_array_alloca, BLI_assert, bm, BM_CREATE_NOP, BM_edge_exists(), BM_elem_attrs_copy(), BM_face_create(), BM_face_exists(), BM_FACE_FIRST_LOOP, BMO_vert_flag_disable, BMO_vert_flag_enable, BMO_vert_flag_test, BMLoop::e, BMFace::len, LOOP_MAP_VERT_INIT, BMLoop::next, NULL, STACK_CLEAR, STACK_DECLARE, STACK_INIT, STACK_PUSH, STACK_SIZE, UNLIKELY, VERT_IN_FACE, and verts.
Referenced by bmo_weld_verts_exec().
|
static |
Definition at line 23 of file bmo_removedoubles.c.
References bm, BM_face_split(), BM_face_vert_share_loop(), BM_ITER_ELEM, BM_loop_is_adjacent(), BM_LOOPS_OF_FACE, l, NULL, blender::io::alembic::split(), and BMLoop::v.
Referenced by bmo_weld_verts_exec().