[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44165] branches/bmesh/blender/source/ blender/bmesh: fix for bug when dissolving faces.
Campbell Barton
ideasman42 at gmail.com
Thu Feb 16 20:00:31 CET 2012
Revision: 44165
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44165
Author: campbellbarton
Date: 2012-02-16 19:00:31 +0000 (Thu, 16 Feb 2012)
Log Message:
-----------
fix for bug when dissolving faces.
When removing an edge between 2 dissolved faces there was no check that a 3rd face was using the edge.
This way dissolving 2 faces could remove faces connected to the removed edges.
Modified Paths:
--------------
branches/bmesh/blender/source/blender/bmesh/intern/bmesh_newcore.c
branches/bmesh/blender/source/blender/bmesh/operators/bmo_create.c
Modified: branches/bmesh/blender/source/blender/bmesh/intern/bmesh_newcore.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/intern/bmesh_newcore.c 2012-02-16 18:06:38 UTC (rev 44164)
+++ branches/bmesh/blender/source/blender/bmesh/intern/bmesh_newcore.c 2012-02-16 19:00:31 UTC (rev 44165)
@@ -921,8 +921,12 @@
d2 = disk_is_flagged(l_iter->e->v2, _FLAG_JF);
if (!d1 && !d2 && !BM_ELEM_API_FLAG_TEST(l_iter->e, _FLAG_JF)) {
- BLI_array_append(deledges, l_iter->e);
- BM_ELEM_API_FLAG_ENABLE(l_iter->e, _FLAG_JF);
+ /* don't remove an edge it makes up the side of another face
+ * else this will remove the face as well - campbell */
+ if (BM_edge_face_count(l_iter->e) <= 2) {
+ BLI_array_append(deledges, l_iter->e);
+ BM_ELEM_API_FLAG_ENABLE(l_iter->e, _FLAG_JF);
+ }
}
else {
if (d1 && !BM_ELEM_API_FLAG_TEST(l_iter->e->v1, _FLAG_JF)) {
@@ -957,7 +961,7 @@
goto error;
}
- /* copy over loop dat */
+ /* copy over loop data */
l_iter = l_first = BM_FACE_FIRST_LOOP(newf);
do {
BMLoop *l2 = l_iter->radial_next;
Modified: branches/bmesh/blender/source/blender/bmesh/operators/bmo_create.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/operators/bmo_create.c 2012-02-16 18:06:38 UTC (rev 44164)
+++ branches/bmesh/blender/source/blender/bmesh/operators/bmo_create.c 2012-02-16 19:00:31 UTC (rev 44165)
@@ -1326,9 +1326,11 @@
/* --- end special case support, continue as normal --- */
+ /* possible bug?, selecting 2 triangles and pressing F will make a quad rather then joining them,
+ * perhaps this should be looked into? - campbell */
- /* call edgenet creat */
- /* call edgenet prepare op so additional face creation cases wor */
+ /* call edgenet create */
+ /* call edgenet prepare op so additional face creation cases wor */
BMO_op_initf(bm, &op2, "edgenet_prepare edges=%fe", ELE_NEW);
BMO_op_exec(bm, &op2);
BMO_slot_buffer_flag_enable(bm, &op2, "edgeout", ELE_NEW, BM_EDGE);
More information about the Bf-blender-cvs
mailing list