diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-10-12 07:23:44 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-10-12 07:23:44 +0400 |
commit | 3a0e563feb08233217f937ac7040be66d062a73b (patch) | |
tree | 83a34d236cd8492a2a431e7985fd10d85e03adfe /source/blender/editors/mesh | |
parent | 0143a8c6e546eeb63bbe90750fa6b628837e9903 (diff) |
bugfix [#23191] Ctrl-LMB quick extrude problem with non-perpendicular edges/faces.
also remove is_mat4_flipped() from transform_manipulator.c.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_add.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index 7dac8a465fa..90c5314bf3d 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -141,7 +141,16 @@ static int dupli_extrude_cursor(bContext *C, wmOperator *op, wmEvent *event) done= 1; } } - if(done) normalize_v3(nor); + if(done) { + float view_vec[3], cross[3]; + + /* correct the normal to be aligned on the view plane */ + copy_v3_v3(view_vec, vc.rv3d->viewinv[2]); + mul_mat3_m4_v3(vc.obedit->imat, view_vec); + cross_v3_v3v3(cross, nor, view_vec); + cross_v3_v3v3(nor, view_vec, cross); + normalize_v3(nor); + } /* center */ add_v3_v3v3(cent, min, max); |