Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-02-26 03:29:12 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-02-26 03:29:12 +0400
commite20d09f079f9ed9a68075927519d5104f331df69 (patch)
tree9126cea2c54dc539a385c38318c812b9915a3ffb /source
parentc65b3b73fd2c0c0011ef36d8fc36301de4a42fe0 (diff)
fix [#30352] Dissolving a vert in an edgeloop (no faces) just deletes the verts killing connections
collapse the vertex into an edge when it has 2 edges connected to it.
Diffstat (limited to 'source')
-rw-r--r--source/blender/bmesh/intern/bmesh_mods.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mods.c b/source/blender/bmesh/intern/bmesh_mods.c
index 19aa37ca22b..dff05df5e66 100644
--- a/source/blender/bmesh/intern/bmesh_mods.c
+++ b/source/blender/bmesh/intern/bmesh_mods.c
@@ -82,8 +82,15 @@ int BM_vert_dissolve(BMesh *bm, BMVert *v)
if (!BM_vert_is_manifold(bm, v)) {
if (!v->e) BM_vert_kill(bm, v);
else if (!v->e->l) {
- BM_edge_kill(bm, v->e);
- BM_vert_kill(bm, v);
+ if (len == 2) {
+ BM_vert_collapse_edge(bm, v->e, v);
+ }
+ else {
+ /* this may be too harsh, we could do nothing here instead.
+ * To test, connect 3 edges to a vert and dissolve the vert. It will be removed */
+ BM_edge_kill(bm, v->e);
+ BM_vert_kill(bm, v);
+ }
}
else {
return FALSE;