|
Blender V4.3
|
#include "MEM_guardedalloc.h"#include "BLI_alloca.h"#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BLI_math_vector.h"#include "bmesh.hh"#include "intern/bmesh_operators_private.hh"Go to the source code of this file.
Macros | |
| #define | DUPE_INPUT 1 /* input from operator */ |
| #define | DUPE_NEW 2 |
| #define | DUPE_DONE 4 |
| #define | SPLIT_INPUT 1 |
| #define | DEL_INPUT 1 |
Functions | |
| static BMVert * | bmo_vert_copy (BMOperator *op, BMOpSlot *slot_vertmap_out, BMesh *bm_dst, const std::optional< BMCustomDataCopyMap > &cd_vert_map, BMVert *v_src, GHash *vhash) |
| static BMEdge * | bmo_edge_copy (BMOperator *op, BMOpSlot *slot_edgemap_out, BMOpSlot *slot_boundarymap_out, BMesh *bm_dst, BMesh *bm_src, const std::optional< BMCustomDataCopyMap > &cd_edge_map, BMEdge *e_src, GHash *vhash, GHash *ehash, const bool use_edge_flip_from_face) |
| static BMFace * | bmo_face_copy (BMOperator *op, BMOpSlot *slot_facemap_out, BMesh *bm_dst, const std::optional< BMCustomDataCopyMap > &cd_face_map, const std::optional< BMCustomDataCopyMap > &cd_loop_map, BMFace *f_src, GHash *vhash, GHash *ehash) |
| static void | bmo_mesh_copy (BMOperator *op, BMesh *bm_dst, BMesh *bm_src) |
| void | bmo_duplicate_exec (BMesh *bm, BMOperator *op) |
| void | bmo_split_exec (BMesh *bm, BMOperator *op) |
| void | bmo_delete_exec (BMesh *bm, BMOperator *op) |
| void | bmo_spin_exec (BMesh *bm, BMOperator *op) |
Duplicate, Split, Split operators.
Definition in file bmo_dupe.cc.
| #define DEL_INPUT 1 |
Referenced by bmo_delete_exec().
| #define DUPE_DONE 4 |
Definition at line 25 of file bmo_dupe.cc.
Referenced by bmo_mesh_copy().
| #define DUPE_INPUT 1 /* input from operator */ |
Definition at line 23 of file bmo_dupe.cc.
Referenced by bmo_duplicate_exec(), bmo_edge_copy(), and bmo_mesh_copy().
| #define DUPE_NEW 2 |
Definition at line 24 of file bmo_dupe.cc.
Referenced by bmo_duplicate_exec(), bmo_edge_copy(), bmo_face_copy(), and bmo_vert_copy().
| #define SPLIT_INPUT 1 |
Referenced by bmo_split_exec().
| void bmo_delete_exec | ( | BMesh * | bm, |
| BMOperator * | op ) |
Definition at line 498 of file bmo_dupe.cc.
References bm, BM_ALL_NOLOOP, BMO_mesh_delete_oflag_context(), BMO_slot_buffer_flag_enable(), BMO_slot_int_get(), DEL_INPUT, and BMOperator::slots_in.
| void bmo_duplicate_exec | ( | BMesh * | bm, |
| BMOperator * | op ) |
Duplicate Operator
Duplicates verts, edges and faces of a mesh.
INPUT SLOTS:
BMOP_DUPE_VINPUT: Buffer containing pointers to mesh vertices to be duplicated BMOP_DUPE_EINPUT: Buffer containing pointers to mesh edges to be duplicated BMOP_DUPE_FINPUT: Buffer containing pointers to mesh faces to be duplicated
OUTPUT SLOTS:
BMOP_DUPE_VORIGINAL: Buffer containing pointers to the original mesh vertices BMOP_DUPE_EORIGINAL: Buffer containing pointers to the original mesh edges BMOP_DUPE_FORIGINAL: Buffer containing pointers to the original mesh faces BMOP_DUPE_VNEW: Buffer containing pointers to the new mesh vertices BMOP_DUPE_ENEW: Buffer containing pointers to the new mesh edges BMOP_DUPE_FNEW: Buffer containing pointers to the new mesh faces
Definition at line 373 of file bmo_dupe.cc.
References bm, BM_ALL_NOLOOP, bmo_mesh_copy(), BMO_slot_buffer_flag_enable(), BMO_slot_buffer_from_enabled_flag(), BMO_slot_copy, BMO_slot_ptr_get(), DUPE_INPUT, DUPE_NEW, BMOperator::slots_in, and BMOperator::slots_out.
|
static |
COPY EDGE
Copy an existing edge from one bmesh to another.
Definition at line 69 of file bmo_dupe.cc.
References BLI_ghash_insert(), BLI_ghash_lookup(), BM_CREATE_SKIP_CD, BM_edge_create(), BM_edge_is_boundary(), BM_edge_verts_swap(), BM_elem_attrs_copy(), BMO_edge_flag_enable, BMO_face_flag_test, BMO_slot_map_elem_insert(), DUPE_INPUT, DUPE_NEW, BMLoop::f, BMEdge::l, BMLoop::radial_next, BMLoop::v, BMEdge::v1, and BMEdge::v2.
Referenced by bmo_mesh_copy().
|
static |
COPY FACE
Copy an existing face from one bmesh to another.
Definition at line 145 of file bmo_dupe.cc.
References BLI_array_alloca, BLI_ghash_lookup(), BM_CREATE_SKIP_CD, BM_elem_attrs_copy(), BM_face_create(), BM_FACE_FIRST_LOOP, BMO_face_flag_enable, BMO_slot_map_elem_insert(), DUPE_NEW, BMLoop::e, BMFace::len, BMLoop::next, and BMLoop::v.
Referenced by bmo_mesh_copy().
|
static |
COPY MESH
Internal Copy function.
Definition at line 207 of file bmo_dupe.cc.
References BLI_assert, BLI_ghash_free(), BLI_ghash_ptr_new(), BM_EDGES_OF_FACE, BM_EDGES_OF_MESH, BM_EDGES_OF_VERT, BM_FACES_OF_MESH, BM_FACES_OF_VERT, BM_ITER_ELEM, BM_ITER_MESH, BM_VERTS_OF_FACE, BM_VERTS_OF_MESH, bmo_edge_copy(), BMO_edge_flag_enable, BMO_edge_flag_test, bmo_face_copy(), BMO_face_flag_enable, BMO_face_flag_test, BMO_mesh_selected_remap(), BMO_slot_bool_get(), BMO_slot_get(), BMO_slot_map_elem_insert(), bmo_vert_copy(), BMO_vert_flag_enable, BMO_vert_flag_test, CustomData_bmesh_copy_map_calc(), DUPE_DONE, DUPE_INPUT, e, BMesh::edata, BMesh::ldata, BMesh::pdata, BMOperator::slots_in, BMOperator::slots_out, v, v2, and BMesh::vdata.
Referenced by bmo_duplicate_exec().
| void bmo_spin_exec | ( | BMesh * | bm, |
| BMOperator * | op ) |
Spin Operator
Extrude or duplicate geometry a number of times, rotating and possibly translating after each step
Definition at line 518 of file bmo_dupe.cc.
References axis_angle_normalized_to_mat3(), bm, BM_EDGE, BM_edge_find_double(), BM_edge_splice(), BM_FACE, BM_face_find_double(), BM_face_kill(), BM_ITER_MESH_INDEX, BM_VERT, BM_vert_splice(), BM_VERTS_OF_MESH, BMO_op_callf(), BMO_op_exec(), BMO_op_finish(), BMO_op_initf(), BMO_slot_bool_get(), BMO_slot_copy, BMO_slot_float_get(), BMO_slot_get(), BMO_slot_int_get(), BMO_slot_vec_get(), BMOpSlot::buf, BMOpSlot::data, BMOperator::flag, is_zero_v3(), BMOpSlot::len, MEM_freeN(), MEM_mallocN, mul_m3_v3(), BMVert::no, normalize_v3(), BMOperator::slots_in, BMOperator::slots_out, steps, BMesh::totvert, and v.
| void bmo_split_exec | ( | BMesh * | bm, |
| BMOperator * | op ) |
Split Operator
Duplicates verts, edges and faces of a mesh but also deletes the originals.
INPUT SLOTS:
BMOP_DUPE_VINPUT: Buffer containing pointers to mesh vertices to be split BMOP_DUPE_EINPUT: Buffer containing pointers to mesh edges to be split BMOP_DUPE_FINPUT: Buffer containing pointers to mesh faces to be split
OUTPUT SLOTS:
BMOP_DUPE_VOUTPUT: Buffer containing pointers to the split mesh vertices BMOP_DUPE_EOUTPUT: Buffer containing pointers to the split mesh edges BMOP_DUPE_FOUTPUT: Buffer containing pointers to the split mesh faces
Definition at line 436 of file bmo_dupe.cc.
References bm, BM_ALL_NOLOOP, BM_EDGES_OF_MESH, BM_EDGES_OF_VERT, BM_FACES_OF_EDGE, BM_ITER_ELEM, BM_ITER_MESH, BM_VERTS_OF_MESH, BMO_edge_flag_enable, BMO_edge_flag_test, BMO_face_flag_test, BMO_mesh_delete_oflag_context(), BMO_op_exec(), BMO_op_finish(), BMO_op_init(), BMO_slot_bool_get(), BMO_slot_buffer_flag_enable(), BMO_slot_copy, BMO_vert_flag_enable, DEL_FACES, e, BMOperator::flag, BMOperator::slots_in, SPLIT_INPUT, and v.
|
static |
COPY VERTEX
Copy an existing vertex from one bmesh to another.
Definition at line 33 of file bmo_dupe.cc.
References BLI_ghash_insert(), BM_CREATE_SKIP_CD, BM_elem_attrs_copy(), BM_vert_create(), BMO_slot_map_elem_insert(), BMO_vert_flag_enable, BMVert::co, and DUPE_NEW.
Referenced by bmo_mesh_copy().