diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-04-30 23:18:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-04-30 23:18:04 +0300 |
commit | 6111da36297dd9d40878c5805dac4b7659ee6ecd (patch) | |
tree | cef936166e7ce9e65ad06c0b1acd876902777d74 /source/blender/bmesh/intern/bmesh_core.c | |
parent | a8221060624f576be015ac3be02a245c6a36e5ee (diff) |
BMesh: add bmesh_disk_vert_replace
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_core.c')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_core.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/source/blender/bmesh/intern/bmesh_core.c b/source/blender/bmesh/intern/bmesh_core.c index 81cc9727965..87f700ac731 100644 --- a/source/blender/bmesh/intern/bmesh_core.c +++ b/source/blender/bmesh/intern/bmesh_core.c @@ -1508,14 +1508,7 @@ BMVert *bmesh_semv(BMesh *bm, BMVert *tv, BMEdge *e, BMEdge **r_e) bmesh_disk_edge_remove(e_new, tv); bmesh_disk_edge_remove(e_new, v_new); - /* remove e from tv's disk cycle */ - bmesh_disk_edge_remove(e, tv); - - /* swap out tv for v_new in e */ - bmesh_disk_vert_swap(e, v_new, tv); - - /* add e to v_new's disk cycle */ - bmesh_disk_edge_append(e, v_new); + bmesh_disk_vert_replace(e, v_new, tv); /* add e_new to v_new's disk cycle */ bmesh_disk_edge_append(e_new, v_new); @@ -1726,12 +1719,8 @@ BMEdge *bmesh_jekv( e_splice = BM_edge_exists(tv, v_old); } - /* remove e_old from v_kill's disk cycle */ - bmesh_disk_edge_remove(e_old, v_kill); - /* relink e_old->v_kill to be e_old->tv */ - bmesh_disk_vert_swap(e_old, tv, v_kill); - /* append e_old to tv's disk cycle */ - bmesh_disk_edge_append(e_old, tv); + bmesh_disk_vert_replace(e_old, tv, v_kill); + /* remove e_kill from tv's disk cycle */ bmesh_disk_edge_remove(e_kill, tv); @@ -2471,9 +2460,7 @@ BMVert *bmesh_urmv_loop_multi( } else { /* we own the edge entirely, replace the vert */ - bmesh_disk_edge_remove(e, v_sep); - bmesh_disk_vert_swap(e, v_new, v_sep); - bmesh_disk_edge_append(e, v_new); + bmesh_disk_vert_replace(e, v_new, v_sep); } /* loop vert is handled last! */ |