Fix T56506: Different behaviour of Bounds Clamp with positive and negative axis.
authorBastien Montagne <montagne29@wanadoo.fr>
Thu, 23 Aug 2018 12:55:40 +0000 (14:55 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Thu, 23 Aug 2018 12:55:40 +0000 (14:55 +0200)
Small typo on minus sign position... ;)

source/blender/blenkernel/intern/lattice.c

index b02396e52968760941f1c31b349db3459ef98fbb..582743acff475f4d1ed853089bf5efe8524ea963 100644 (file)
@@ -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);
        }