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:
authorAntonio Vazquez <blendergit@gmail.com>2022-04-04 17:59:02 +0300
committerFabian Schempp <fabianschempp@googlemail.com>2022-04-11 01:31:57 +0300
commit2db33b9d03629680e03ff6ca40392b7958e59e6d (patch)
tree9d00bef0f6970acf096e36ea411f5e55806d8a82 /source
parent9027e63fb02fc2de6e60b96107582d7460aa2401 (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
Diffstat (limited to 'source')
-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);
}