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>2012-12-10 12:15:14 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-12-10 12:15:14 +0400
commit1b19b790dd599c4f3950dee3b4dccb4534ef9493 (patch)
tree9675528a9cb7e183954a2589658714a7a051eae5 /source/blender/editors/mesh
parent26d6872ef8421ef22f51d585e5821f1e15a0552e (diff)
fix for knife when clipping was enabled, The knife would not snap to edges/verts outside the clip area but the geometry would still get cut
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index 6cc6c511070..a59c491fe13 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -1181,7 +1181,6 @@ static BMEdgeHit *knife_edge_tri_isect(KnifeTool_OpData *kcd, BMBVHTree *bmtree,
result = results = BLI_bvhtree_overlap(tree, tree2, &tot);
for (i = 0; i < tot; i++, result++) {
- float p[3];
BMLoop *l1;
BMFace *hitf;
ListBase *lst;
@@ -1200,7 +1199,7 @@ static BMEdgeHit *knife_edge_tri_isect(KnifeTool_OpData *kcd, BMBVHTree *bmtree,
}
if (isect_line_tri_v3(kfe->v1->cageco, kfe->v2->cageco, v1, v2, v3, &lambda, NULL)) {
- float no[3], view[3], sp[3];
+ float p[3], no[3], view[3], sp[3];
interp_v3_v3v3(p, kfe->v1->cageco, kfe->v2->cageco, lambda);
@@ -1215,6 +1214,11 @@ static BMEdgeHit *knife_edge_tri_isect(KnifeTool_OpData *kcd, BMBVHTree *bmtree,
{
continue;
}
+ if ((kcd->vc.rv3d->rflag & RV3D_CLIPPING) &&
+ ED_view3d_clipping_test(kcd->vc.rv3d, p, TRUE))
+ {
+ continue;
+ }
knife_project_v3(kcd, p, sp);
ED_view3d_unproject(mats, view, sp[0], sp[1], 0.0f);