diff options
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_structure.c')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_structure.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/bmesh/intern/bmesh_structure.c b/source/blender/bmesh/intern/bmesh_structure.c index 30ab693beb7..5bc36cefad2 100644 --- a/source/blender/bmesh/intern/bmesh_structure.c +++ b/source/blender/bmesh/intern/bmesh_structure.c @@ -74,10 +74,15 @@ void bmesh_edge_vert_swap(BMEdge *e, BMVert *v_dst, BMVert *v_src) } /* swap out edges */ + bmesh_disk_vert_replace(e, v_dst, v_src); +} + +void bmesh_disk_vert_replace(BMEdge *e, BMVert *v_dst, BMVert *v_src) +{ BLI_assert(e->v1 == v_src || e->v2 == v_src); - bmesh_disk_edge_remove(e, v_src); - bmesh_disk_vert_swap(e, v_dst, v_src); - bmesh_disk_edge_append(e, v_dst); + bmesh_disk_edge_remove(e, v_src); /* remove e from tv's disk cycle */ + bmesh_disk_vert_swap(e, v_dst, v_src); /* swap out tv for v_new in e */ + bmesh_disk_edge_append(e, v_dst); /* add e to v_dst's disk cycle */ BLI_assert(e->v1 != e->v2); } @@ -114,6 +119,7 @@ void bmesh_edge_vert_swap(BMEdge *e, BMVert *v_dst, BMVert *v_src) * the disk cycle has no problems dealing with non-manifold conditions involving faces. * * Functions relating to this cycle: + * - #bmesh_disk_vert_replace * - #bmesh_disk_edge_append * - #bmesh_disk_edge_remove * - #bmesh_disk_edge_next |