[Bf-blender-cvs] [5eab5713c02] master: Fix T97019: Regression - GPencil Shrinkwrap modifier not longer working

Antonio Vazquez noreply at git.blender.org
Mon Apr 4 22:33:32 CEST 2022


Commit: 5eab5713c0236ebf3626dd747ab2a9b96c8ebd78
Author: Antonio Vazquez
Date:   Mon Apr 4 16:59:02 2022 +0200
Branches: master
https://developer.blender.org/rB5eab5713c0236ebf3626dd747ab2a9b96c8ebd78

Fix T97019: Regression - GPencil Shrinkwrap modifier not longer working

Bug introduced in the smooth function changes done in commit rBd4e1458db3a0e0eaf80219dc8e6d10cb27620793

Differential Revision: https://developer.blender.org/D14548

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

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

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

diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilshrinkwrap.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilshrinkwrap.c
index d80224e6639..7de1cc89a45 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilshrinkwrap.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilshrinkwrap.c
@@ -105,18 +105,16 @@ static void deformStroke(GpencilModifierData *md,
 
   /* Apply deformed coordinates. */
   pt = gps->points;
-  bGPDstroke gps_old = *gps;
-  gps_old.points = (bGPDspoint *)MEM_dupallocN(gps->points);
   for (i = 0; i < gps->totpoints; i++, pt++) {
     copy_v3_v3(&pt->x, vert_coords[i]);
-    /* Smooth stroke. */
-    BKE_gpencil_stroke_smooth_point(
-        &gps_old, i, mmd->smooth_factor, mmd->smooth_step, true, false, gps);
   }
-  MEM_freeN(gps_old.points);
 
   MEM_freeN(vert_coords);
 
+  /* Smooth stroke. */
+  BKE_gpencil_stroke_smooth(
+      gps, mmd->smooth_factor, mmd->smooth_step, true, false, false, false, true, NULL);
+
   /* Calc geometry data. */
   BKE_gpencil_stroke_geometry_update(gpd, gps);
 }



More information about the Bf-blender-cvs mailing list