[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44007] branches/bmesh/blender/source/ blender/bmesh/operators/dissolveops.c: fix for crash with recent edge dissolve/ vertex option - when the entire grid was dissolved in edge mode.
Campbell Barton
ideasman42 at gmail.com
Fri Feb 10 03:42:23 CET 2012
Revision: 44007
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44007
Author: campbellbarton
Date: 2012-02-10 02:42:15 +0000 (Fri, 10 Feb 2012)
Log Message:
-----------
fix for crash with recent edge dissolve/vertex option - when the entire grid was dissolved in edge mode.
this also simplifies the code.
Modified Paths:
--------------
branches/bmesh/blender/source/blender/bmesh/operators/dissolveops.c
Modified: branches/bmesh/blender/source/blender/bmesh/operators/dissolveops.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/operators/dissolveops.c 2012-02-10 01:40:37 UTC (rev 44006)
+++ branches/bmesh/blender/source/blender/bmesh/operators/dissolveops.c 2012-02-10 02:42:15 UTC (rev 44007)
@@ -255,7 +255,12 @@
if (use_verts) {
BM_ITER(v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
- BMO_ClearFlag(bm, v, VERT_MARK);
+ if (BM_Vert_EdgeCount(v) == 2) {
+ BMO_ClearFlag(bm, v, VERT_MARK);
+ }
+ else {
+ BMO_SetFlag(bm, v, VERT_MARK);
+ }
}
}
@@ -263,26 +268,11 @@
const int edge_face_count = BM_Edge_FaceCount(e);
if (edge_face_count == 2) {
- if (use_verts) {
- /* later check if these verts are between 2 edges and can dissolve */
- BMO_SetFlag(bm, e->v1, VERT_MARK);
- BMO_SetFlag(bm, e->v2, VERT_MARK);
- }
-
/* join faces */
BM_Join_TwoFaces(bm, e->l->f,
e->l->radial_next->f,
e);
}
- else if (edge_face_count < 2) {
- /* join verts, assign because first join frees the edge */
- BMVert *v1 = e->v1, *v2 = e->v2;
-
- /* collapse the ver */
- if (BM_Vert_EdgeCount(v1) == 2) BM_Collapse_Vert_Edges(bm, v1->e, v1);
- if (BM_Vert_EdgeCount(v2) == 2) BM_Collapse_Vert_Edges(bm, v2->e, v2);
-
- }
}
if (use_verts) {
More information about the Bf-blender-cvs
mailing list