[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52838] trunk/blender/source/blender/ editors/mesh/editmesh_knife.c: 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
Campbell Barton
ideasman42 at gmail.com
Mon Dec 10 09:15:19 CET 2012
Revision: 52838
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52838
Author: campbellbarton
Date: 2012-12-10 08:15:14 +0000 (Mon, 10 Dec 2012)
Log Message:
-----------
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
Modified Paths:
--------------
trunk/blender/source/blender/editors/mesh/editmesh_knife.c
Modified: trunk/blender/source/blender/editors/mesh/editmesh_knife.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editmesh_knife.c 2012-12-10 07:53:20 UTC (rev 52837)
+++ trunk/blender/source/blender/editors/mesh/editmesh_knife.c 2012-12-10 08:15:14 UTC (rev 52838)
@@ -1181,7 +1181,6 @@
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 @@
}
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 @@
{
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);
More information about the Bf-blender-cvs
mailing list