Blender  V3.3
Macros | Functions
bmo_dupe.c File Reference
#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 BMVertbmo_vert_copy (BMOperator *op, BMOpSlot *slot_vertmap_out, BMesh *bm_dst, BMesh *bm_src, BMVert *v_src, GHash *vhash)
 
static BMEdgebmo_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 BMFacebmo_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)
 

Detailed Description

Duplicate, Split, Split operators.

Definition in file bmo_dupe.c.

Macro Definition Documentation

◆ DEL_INPUT

#define DEL_INPUT   1

◆ DUPE_DONE

#define DUPE_DONE   4

Definition at line 21 of file bmo_dupe.c.

◆ DUPE_INPUT

#define DUPE_INPUT   1 /* input from operator */

Definition at line 19 of file bmo_dupe.c.

◆ DUPE_NEW

#define DUPE_NEW   2

Definition at line 20 of file bmo_dupe.c.

◆ SPLIT_INPUT

#define SPLIT_INPUT   1

Function Documentation

◆ bmo_delete_exec()

void bmo_delete_exec ( BMesh bm,
BMOperator op 
)

◆ bmo_duplicate_exec()

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.

◆ bmo_edge_copy()

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

◆ bmo_face_copy()

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

◆ bmo_mesh_copy()

static void bmo_mesh_copy ( BMOperator op,
BMesh bm_dst,
BMesh bm_src 
)
static

◆ bmo_spin_exec()

void bmo_spin_exec ( BMesh bm,
BMOperator op 
)

◆ bmo_split_exec()

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

Note
Lower level uses of this operator may want to use BM_mesh_separate_faces Since it's faster for the 'use_only_faces' case.

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.

◆ bmo_vert_copy()

static BMVert* bmo_vert_copy ( BMOperator op,
BMOpSlot slot_vertmap_out,
BMesh bm_dst,
BMesh bm_src,
BMVert v_src,
GHash vhash 
)
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().