Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_alloca.h"
#include "BLI_math.h"
#include "bmesh.h"
#include "intern/bmesh_operators_private.h"
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, BMesh *bm_src, 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, 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, BMesh *bm_src, 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.c.
#define DEL_INPUT 1 |
#define DUPE_DONE 4 |
Definition at line 21 of file bmo_dupe.c.
Definition at line 19 of file bmo_dupe.c.
#define DUPE_NEW 2 |
Definition at line 20 of file bmo_dupe.c.
#define SPLIT_INPUT 1 |
void bmo_delete_exec | ( | BMesh * | bm, |
BMOperator * | op | ||
) |
Definition at line 452 of file bmo_dupe.c.
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 327 of file bmo_dupe.c.
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 60 of file bmo_dupe.c.
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, NULL, 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 130 of file bmo_dupe.c.
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, NULL, and BMLoop::v.
Referenced by bmo_mesh_copy().
|
static |
COPY MESH
Internal Copy function.
Definition at line 181 of file bmo_dupe.c.
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, DUPE_DONE, DUPE_INPUT, e, NULL, BMOperator::slots_in, BMOperator::slots_out, v, and v2.
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 472 of file bmo_dupe.c.
References Freestyle::a, 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(), NULL, 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 390 of file bmo_dupe.c.
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 29 of file bmo_dupe.c.
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, DUPE_NEW, and NULL.
Referenced by bmo_mesh_copy().