Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2019-01-25 12:44:46 +0300
committerAntonioya <blendergit@gmail.com>2019-01-25 12:44:46 +0300
commitd87e7af1ec2021e177de60a754c20aa2855dd660 (patch)
treeb68dd6705109225759d467a2a5e9d060d3b36729 /source
parent05ebdc2b71ab45024467faf40897ebd2707a0d5c (diff)
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.
Diffstat (limited to 'source')
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c7
1 files changed, 6 insertions, 1 deletions
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);