diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-05-22 00:35:08 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-05-22 00:37:50 +0400 |
commit | a217db0d6373a4050658049a9ded84f34b33f952 (patch) | |
tree | 18a2c2befaaf38f0d4ab40e1a8b96a45e71bf067 /source/blender/editors | |
parent | 8d297394ba51246f2db0d503df7f4cae19ca6e92 (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/editors')
-rw-r--r-- | source/blender/editors/mesh/editmesh_rip.c | 7 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 2 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 1 |
3 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c index 84952297235..58701e776b7 100644 --- a/source/blender/editors/mesh/editmesh_rip.c +++ b/source/blender/editors/mesh/editmesh_rip.c @@ -217,8 +217,8 @@ static BMEdge *edbm_ripsel_edge_mark_step(BMVert *v, const int uid) BM_edge_loop_pair(e, &l_a, &l_b); /* no need to check, we know this will be true */ /* so (IS_VISIT_DONE == true) */ - BM_elem_index_set(l_a, uid); - BM_elem_index_set(l_b, uid); + BM_elem_index_set(l_a, uid); /* set_dirty */ + BM_elem_index_set(l_b, uid); /* set_dirty */ return e; } @@ -250,9 +250,10 @@ static EdgeLoopPair *edbm_ripsel_looptag_helper(BMesh *bm) /* initialize loops with dummy invalid index values */ BM_ITER_MESH (f, &fiter, bm, BM_FACES_OF_MESH) { BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) { - BM_elem_index_set(l, INVALID_UID); + BM_elem_index_set(l, INVALID_UID); /* set_dirty */ } } + bm->elem_index_dirty |= BM_LOOP; /* set contiguous loops ordered 'uid' values for walking after split */ while (true) { diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 159eac4a275..8672a479ab5 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -2460,7 +2460,7 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op) if (ED_view3d_project_float_object(ar, bv->co, *sco, V3D_PROJ_TEST_CLIP_NEAR) != V3D_PROJ_RET_OK) { copy_v2_fl(*sco, FLT_MAX); /* set error value */ } - BM_elem_index_set(bv, i); /* set_ok */ + BM_elem_index_set(bv, i); /* set_inline */ sco++; } diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 7f6ea9b7982..ac52cf6b53f 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -1889,6 +1889,7 @@ static void editmesh_set_connectivity_distance(BMesh *bm, float mtx[3][3], float dists[i] = 0.0f; } } + bm->elem_index_dirty &= ~BM_VERT; } do { |