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
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2014-05-22 00:35:08 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-05-22 00:37:50 +0400
commita217db0d6373a4050658049a9ded84f34b33f952 (patch)
tree18a2c2befaaf38f0d4ab40e1a8b96a45e71bf067 /source/blender/bmesh/tools/bmesh_decimate_collapse.c
parent8d297394ba51246f2db0d503df7f4cae19ca6e92 (diff)
Fix T40297: Crash while ripping an edge when autosmooth is activated.
Turned out there was still quite a few cases were indices were set dirty, but elem_index_dirty was not tagged accordingly (mostly for BM_LOOP, but a few others as well). So probably this crash was not the only one hidden here. Hopefully all possible cases were catched this time!
Diffstat (limited to 'source/blender/bmesh/tools/bmesh_decimate_collapse.c')
-rw-r--r--source/blender/bmesh/tools/bmesh_decimate_collapse.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/bmesh/tools/bmesh_decimate_collapse.c b/source/blender/bmesh/tools/bmesh_decimate_collapse.c
index f614c43193a..4b6209fc4eb 100644
--- a/source/blender/bmesh/tools/bmesh_decimate_collapse.c
+++ b/source/blender/bmesh/tools/bmesh_decimate_collapse.c
@@ -312,12 +312,14 @@ static bool bm_decim_triangulate_begin(BMesh *bm)
l_iter = l_first = BM_FACE_FIRST_LOOP(f);
do {
- BM_elem_index_set(l_iter, -1);
+ BM_elem_index_set(l_iter, -1); /* set_dirty */
} while ((l_iter = l_iter->next) != l_first);
// has_quad |= (f->len == 4)
}
+ bm->elem_index_dirty |= BM_LOOP;
+
/* adding new faces as we loop over faces
* is normally best avoided, however in this case its not so bad because any face touched twice
* will already be triangulated*/
@@ -366,8 +368,8 @@ static bool bm_decim_triangulate_begin(BMesh *bm)
/* since we just split theres only ever 2 loops */
BLI_assert(BM_edge_is_manifold(l_new->e));
- BM_elem_index_set(l_new, f_index);
- BM_elem_index_set(l_new->radial_next, f_index);
+ BM_elem_index_set(l_new, f_index); /* set_dirty */
+ BM_elem_index_set(l_new->radial_next, f_index); /* set_dirty */
BM_face_normal_update(f);
BM_face_normal_update(f_new);