diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-07-18 16:23:18 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-07-18 16:23:18 +0400 |
commit | e1449e3626e7b7ede2f0a1c3288e3e66cfff200b (patch) | |
tree | f8327a110f4b96c5c0fd92f3ef552666dff80354 /source/blender/editors/transform | |
parent | eceec8856d6b28c48022a927d6281dd583bb7880 (diff) |
Fix [#32068] Edge slide not working in certain circumstance from Front / Side views
Only visible edges are used to create the "sliding vector". The test used to detect whether edges were visible or not was working for solid shading, but useless in wire draw mode (as all edges are visible in this mode!)...
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r-- | source/blender/editors/transform/transform.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index e2752f5e828..8eb2371a598 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -4706,7 +4706,7 @@ static int createSlideVerts(TransInfo *t) float projectMat[4][4]; float mval[2] = {(float)t->mval[0], (float)t->mval[1]}; float start[3] = {0.0f, 0.0f, 0.0f}, dir[3], end[3] = {0.0f, 0.0f, 0.0f}; - float vec[3], vec2[3], lastvec[3] /*, size, dis=0.0, z */ /* UNUSED */; + float vec[3], vec2[3] /*, lastvec[3], size, dis=0.0, z */ /* UNUSED */; int numsel, i, j; if (t->spacetype == SPACE_VIEW3D) { @@ -4894,7 +4894,7 @@ static int createSlideVerts(TransInfo *t) } while (e != first->e && l1); } - //EDBM_flag_disable_all(em, BM_ELEM_SELECT); + /* EDBM_flag_disable_all(em, BM_ELEM_SELECT); */ sld->sv = sv_array; sld->totsv = j; @@ -4902,14 +4902,15 @@ static int createSlideVerts(TransInfo *t) /*find mouse vector*/ /* dis = z = -1.0f; */ /* UNUSED */ /* size = 50.0; */ /* UNUSED */ - zero_v3(lastvec); zero_v3(dir); + /* zero_v3(lastvec); */ /* UNUSED */ + zero_v3(dir); /* ee = le = NULL; */ /* UNUSED */ BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) { if (BM_elem_flag_test(e, BM_ELEM_SELECT)) { BMIter iter2; BMEdge *e2; float vec1[3], dis2, mval[2] = {t->mval[0], t->mval[1]}, d; - + /* search cross edges for visible edge to the mouse cursor, * then use the shared vertex to calculate screen vector*/ dis2 = -1.0f; @@ -4918,10 +4919,12 @@ static int createSlideVerts(TransInfo *t) BM_ITER_ELEM (e2, &iter2, v, BM_EDGES_OF_VERT) { if (BM_elem_flag_test(e2, BM_ELEM_SELECT)) continue; - - if (v3d && !BMBVH_EdgeVisible(btree, e2, ar, v3d, t->obedit)) + + /* This test is only relevant if object is not wire-dranw! See [#32068]. */ + if (v3d && t->obedit->dt > OB_WIRE && v3d->drawtype > OB_WIRE && + !BMBVH_EdgeVisible(btree, e2, ar, v3d, t->obedit)) continue; - + j = GET_INT_FROM_POINTER(BLI_smallhash_lookup(&table, (uintptr_t)v)); if (sv_array[j].down) { |