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:
authorCampbell Barton <ideasman42@gmail.com>2014-08-17 06:50:48 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-08-17 06:50:48 +0400
commit1dd17bed4a7a322e6493914fee25ee9562e153ea (patch)
treebc1db4a3baa406634e1b66710b992391b22da801 /source/blender/editors/mesh
parentbba80ed7afa8ccea14310f35f767749f5d04207e (diff)
Knife tool: simplify hit-depth calculation
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index 609f0183afd..4182d0ecf20 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -1224,16 +1224,7 @@ static void clip_to_ortho_planes(float v1[3], float v2[3], float d)
static void set_linehit_depth(KnifeTool_OpData *kcd, KnifeLineHit *lh)
{
- float vnear[3], vfar[3];
-
- ED_view3d_win_to_segment(kcd->ar, kcd->vc.v3d, lh->schit, vnear, vfar, true);
- mul_m4_v3(kcd->ob->imat, vnear);
- if (kcd->is_ortho && (kcd->vc.rv3d->persp != RV3D_CAMOB)) {
- if (kcd->ortho_extent == 0.0f)
- calc_ortho_extent(kcd);
- clip_to_ortho_planes(vnear, vfar, kcd->ortho_extent + 10.0f);
- }
- lh->m = len_v3v3(vnear, lh->cagehit);
+ lh->m = dot_m4_v3_row_z(kcd->vc.rv3d->persmatob, lh->cagehit);
}
/* Finds visible (or all, if cutting through) edges that intersects the current screen drag line */