[Bf-blender-cvs] [097a560bc9] surface-deform-modifier: Fix silly mistake in nearestVert

Luca Rood noreply at git.blender.org
Sun Jan 15 19:55:39 CET 2017


Commit: 097a560bc92cde60b8001c30478449a910e2c202
Author: Luca Rood
Date:   Sat Jan 14 22:45:17 2017 -0200
Branches: surface-deform-modifier
https://developer.blender.org/rB097a560bc92cde60b8001c30478449a910e2c202

Fix silly mistake in nearestVert

===================================================================

M	source/blender/modifiers/intern/MOD_surfacedeform.c

===================================================================

diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.c b/source/blender/modifiers/intern/MOD_surfacedeform.c
index 801e5526e3..1e03004881 100644
--- a/source/blender/modifiers/intern/MOD_surfacedeform.c
+++ b/source/blender/modifiers/intern/MOD_surfacedeform.c
@@ -300,7 +300,7 @@ BLI_INLINE int nearestVert(SDefBindCalcData * const data, const float point_co[3
 
 	for (i = 0; i < poly->totloop; i++, loop++) {
 		edge = &data->medge[loop->e];
-		dist = dist_squared_to_line_segment_v3(point_co, mvert[edge->v1].co, mvert[edge->v1].co);
+		dist = dist_squared_to_line_segment_v3(point_co, mvert[edge->v1].co, mvert[edge->v2].co);
 
 		if (dist < max_dist) {
 			max_dist = dist;




More information about the Bf-blender-cvs mailing list