[Bf-blender-cvs] [d87e7af1ec2] master: T60748 Second try to fix start extreme in Noise modifier

Antonioya noreply at git.blender.org
Fri Jan 25 10:44:53 CET 2019


Commit: d87e7af1ec2021e177de60a754c20aa2855dd660
Author: Antonioya
Date:   Fri Jan 25 10:44:46 2019 +0100
Branches: master
https://developer.blender.org/rBd87e7af1ec2021e177de60a754c20aa2855dd660

T60748 Second try to fix start extreme in Noise modifier

The first point was moving inverted because first vector was inverted. Now, the vector is changed for the first point to get the same direction.

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

M	source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c

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

diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c
index 94f83f10fb5..8b3752c8028 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c
@@ -170,7 +170,12 @@ static void deformStroke(
 		}
 
 		/* initial vector (p0 -> p1) */
-		sub_v3_v3v3(vec1, &pt1->x, &pt0->x);
+		if (i == 0) {
+			sub_v3_v3v3(vec1, &pt0->x, &pt1->x);
+		}
+		else {
+			sub_v3_v3v3(vec1, &pt1->x, &pt0->x);
+		}
 		vran = len_v3(vec1);
 		/* vector orthogonal to normal */
 		cross_v3_v3v3(vec2, vec1, normal);



More information about the Bf-blender-cvs mailing list