Revision: 44445
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44445
Author:   campbellbarton
Date:     2012-02-26 00:43:47 +0000 (Sun, 26 Feb 2012)
Log Message:
-----------
fix for vertex dissolve not doing anything with a single vertex on a single 
face.
now collapse the vertex into the edges.

also disable removing the vertrex when it could not be collapsed (old code), 
found it could would connected faces which isn't acceptable - now return fail 
in that case.

Modified Paths:
--------------
    trunk/blender/source/blender/bmesh/intern/bmesh_mods.c

Modified: trunk/blender/source/blender/bmesh/intern/bmesh_mods.c
===================================================================
--- trunk/blender/source/blender/bmesh/intern/bmesh_mods.c      2012-02-25 
23:56:20 UTC (rev 44444)
+++ trunk/blender/source/blender/bmesh/intern/bmesh_mods.c      2012-02-26 
00:43:47 UTC (rev 44445)
@@ -72,20 +72,22 @@
                }
                else if (!v->e->l) {
                        if (len == 2) {
-                               BM_vert_collapse_edge(bm, v->e, v);
+                               return (BM_vert_collapse_edge(bm, v->e, v) != 
NULL);
                        }
                        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_vert_kill(bm, v); /* will kill edges too */
+                               /* used to kill the vertex here, but it may be 
connected to faces.
+                                * so better do nothing */
+                               return FALSE;
                        }
-                       return TRUE;
                }
                else {
                        return FALSE;
                }
        }
+       else if (len == 2 && BM_vert_face_count(v) == 1) {
+               /* boundry vertex on a face */
+               return (BM_vert_collapse_edge(bm, v->e, v) != NULL);
+       }
        else {
                return BM_disk_dissolve(bm, v);
        }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to