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
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2022-04-04 17:59:02 +0300
committerAntonio Vazquez <blendergit@gmail.com>2022-04-04 23:33:20 +0300
commit5eab5713c0236ebf3626dd747ab2a9b96c8ebd78 (patch)
treead7e3ca18cfd3ad6fa607fe3793ed0f293a1656d
parent0ebcc711fc2767f2d260d8e124af1074da9c8a59 (diff)
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
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilshrinkwrap.c10
1 files changed, 4 insertions, 6 deletions
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);
}