GPencil: Simplify modifier minimal vert count fix

Lower the minimal vert count for all simplify modes.

Differential Revision: http://developer.blender.org/D14319
This commit is contained in:
Henrik Dick
2022-03-13 17:21:30 +01:00
parent 70720c42c2
commit a6b5d5bfe8
2 changed files with 3 additions and 3 deletions

View File

@@ -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;

View File

@@ -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,