[Bf-blender-cvs] [c5206e5d2f8] master: Fix T56506: Different behaviour of Bounds Clamp with positive and negative axis.

Bastien Montagne noreply at git.blender.org
Thu Aug 23 14:56:18 CEST 2018


Commit: c5206e5d2f880adf9cff8ed295be5ec160d18e0d
Author: Bastien Montagne
Date:   Thu Aug 23 14:55:40 2018 +0200
Branches: master
https://developer.blender.org/rBc5206e5d2f880adf9cff8ed295be5ec160d18e0d

Fix T56506: Different behaviour of Bounds Clamp with positive and negative axis.

Small typo on minus sign position... ;)

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

M	source/blender/blenkernel/intern/lattice.c

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

diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c
index b02396e5296..582743acff4 100644
--- a/source/blender/blenkernel/intern/lattice.c
+++ b/source/blender/blenkernel/intern/lattice.c
@@ -624,7 +624,7 @@ static bool calc_curve_deform(Scene *scene, Object *par, float co[3],
 	if (is_neg_axis) {
 		index = axis - 3;
 		if (cu->flag & CU_STRETCH)
-			fac = (-co[index] - cd->dmax[index]) / (cd->dmax[index] - cd->dmin[index]);
+			fac = -(co[index] - cd->dmax[index]) / (cd->dmax[index] - cd->dmin[index]);
 		else
 			fac = -(co[index] - cd->dmax[index]) / (par->curve_cache->path->totdist);
 	}



More information about the Bf-blender-cvs mailing list