[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39254] branches/bmesh/blender/source/ blender/editors/mesh/knifetool.c: fix edge tracking in knife tool
Howard Trickey
howard.trickey at gmail.com
Wed Aug 10 14:56:52 CEST 2011
Revision: 39254
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39254
Author: howardt
Date: 2011-08-10 12:56:51 +0000 (Wed, 10 Aug 2011)
Log Message:
-----------
fix edge tracking in knife tool
Modified Paths:
--------------
branches/bmesh/blender/source/blender/editors/mesh/knifetool.c
Modified: branches/bmesh/blender/source/blender/editors/mesh/knifetool.c
===================================================================
--- branches/bmesh/blender/source/blender/editors/mesh/knifetool.c 2011-08-10 12:36:18 UTC (rev 39253)
+++ branches/bmesh/blender/source/blender/editors/mesh/knifetool.c 2011-08-10 12:56:51 UTC (rev 39254)
@@ -1158,20 +1158,11 @@
float d;
if (!kcd->ignore_edge_snapping || !(cure->e)) {
-
- closest_to_line_segment_v3(p, sco, cure->v1->sco, cure->v2->sco);
- sub_v3_v3(p, cure->v1->sco);
-
if (kcd->snap_midpoints) {
- d = 0.5f;
+ interp_v3_v3v3(p, cure->v1->co, cure->v2->co, 0.5f);
} else {
- d = len_v3v3(cure->v1->sco, cure->v2->sco);
- if (d != 0.0) {
- d = len_v3(p) / d;
- }
+ closest_to_line_segment_v3(p, co, cure->v1->co, cure->v2->co);
}
-
- interp_v3_v3v3(p, cure->v1->co, cure->v2->co, d);
} else {
return NULL;
}
More information about the Bf-blender-cvs
mailing list