diff options
author | Henrik Dick <hen-di@web.de> | 2022-03-13 19:21:30 +0300 |
---|---|---|
committer | Henrik Dick <hen-di@web.de> | 2022-03-13 19:21:30 +0300 |
commit | a6b5d5bfe83e9d692a268cfbc979df8906391e34 (patch) | |
tree | 4144c4686ab6beb519006bd7978f3bf385de6673 /source | |
parent | 70720c42c21265d88e2182eebfe5d6544d197424 (diff) |
GPencil: Simplify modifier minimal vert count fix
Lower the minimal vert count for all simplify modes.
Differential Revision: http://developer.blender.org/D14319
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/gpencil_geom.cc | 4 | ||||
-rw-r--r-- | source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/gpencil_geom.cc b/source/blender/blenkernel/intern/gpencil_geom.cc index 2160d567db5..e4ed2a40f10 100644 --- a/source/blender/blenkernel/intern/gpencil_geom.cc +++ b/source/blender/blenkernel/intern/gpencil_geom.cc @@ -2032,7 +2032,7 @@ void BKE_gpencil_stroke_simplify_adaptive(bGPdata *gpd, bGPDstroke *gps, float e void BKE_gpencil_stroke_simplify_fixed(bGPdata *gpd, bGPDstroke *gps) { - if (gps->totpoints < 5) { + if (gps->totpoints < 4) { return; } @@ -2047,7 +2047,7 @@ void BKE_gpencil_stroke_simplify_fixed(bGPdata *gpd, bGPDstroke *gps) /* resize gps */ int newtot = (gps->totpoints - 2) / 2; - if (((gps->totpoints - 2) % 2) > 0) { + if ((gps->totpoints % 2) != 0) { newtot++; } newtot += 2; diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c index 365b9afe348..f94b5d05291 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c @@ -64,7 +64,7 @@ static void deformStroke(GpencilModifierData *md, mmd->material, mmd->pass_index, mmd->layer_pass, - mmd->mode == GP_SIMPLIFY_SAMPLE ? 2 : 4, + mmd->mode == GP_SIMPLIFY_SAMPLE ? 2 : 3, gpl, gps, mmd->flag & GP_SIMPLIFY_INVERT_LAYER, |