Fix T60748: Move GP stroke extremes with noise modifier
authorAntonioya <blendergit@gmail.com>
Tue, 22 Jan 2019 15:48:45 +0000 (16:48 +0100)
committerAntonioya <blendergit@gmail.com>
Tue, 22 Jan 2019 15:48:45 +0000 (16:48 +0100)
source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c

index 7a9a3efbd95576926c27cf8fa682f00008522c79..e25908d2d011d40090fa378105e38c8312c559b4 100644 (file)
@@ -138,13 +138,13 @@ static void deformStroke(
                        continue;
                }
 
-               /* last point is special */
-               if (i == gps->totpoints) {
+               /* first point is special */
+               if (i == 0) {
                        if (gps->dvert) {
-                               dvert = &gps->dvert[i - 2];
+                               dvert = &gps->dvert[0];
                        }
-                       pt0 = &gps->points[i - 2];
-                       pt1 = &gps->points[i - 1];
+                       pt0 = &gps->points[1];
+                       pt1 = &gps->points[0];
                }
                else {
                        int prev_idx = i - 1;