BMesh: utility function to split off wire edges
This commit is contained in:
@@ -2499,6 +2499,30 @@ void BM_vert_separate_hflag(
|
||||
}
|
||||
}
|
||||
|
||||
void BM_vert_separate_wire_hflag(
|
||||
BMesh *UNUSED(bm), BMVert *v_dst, BMVert *v_src,
|
||||
const char hflag)
|
||||
{
|
||||
LinkNode *edges_hflag = NULL;
|
||||
BMEdge *e_iter, *e_first;
|
||||
|
||||
e_iter = e_first = v_src->e;
|
||||
do {
|
||||
if (BM_elem_flag_test(e_iter, hflag)) {
|
||||
if (BM_edge_is_wire(e_iter)) {
|
||||
BLI_linklist_prepend_alloca(&edges_hflag, e_iter);
|
||||
}
|
||||
}
|
||||
} while ((e_iter = BM_DISK_EDGE_NEXT(e_iter, v_src)) != e_first);
|
||||
|
||||
if (edges_hflag) {
|
||||
do {
|
||||
e_iter = edges_hflag->link;
|
||||
bmesh_disk_vert_replace(e_iter, v_dst, v_src);
|
||||
} while ((edges_hflag = edges_hflag->next));
|
||||
}
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
|
||||
|
||||
@@ -84,6 +84,9 @@ void BM_vert_separate(
|
||||
void BM_vert_separate_hflag(
|
||||
BMesh *bm, BMVert *v, const char hflag, const bool copy_select,
|
||||
BMVert ***r_vout, int *r_vout_len);
|
||||
void BM_vert_separate_wire_hflag(
|
||||
BMesh *bm, BMVert *v_dst, BMVert *v_src,
|
||||
const char hflag);
|
||||
|
||||
/* EULER API - For modifying structure */
|
||||
BMFace *bmesh_sfme(
|
||||
|
||||
Reference in New Issue
Block a user