Merge branch 'blender-v2.83-release'

This commit is contained in:
Antonio Vazquez 2020-04-25 10:41:44 +02:00
commit 78887318e2
1 changed files with 17 additions and 0 deletions

View File

@ -134,6 +134,19 @@ static void gp_interpolate_free_temp_strokes(bGPDframe *gpf)
}
}
}
/* Helper: Untag all strokes. */
static void gp_interpolate_untag_strokes(bGPDframe *gpf)
{
BLI_assert(gpf != NULL);
LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) {
if (gps->flag & GP_STROKE_TAG) {
gps->flag &= ~GP_STROKE_TAG;
}
}
}
/* Helper: Update all strokes interpolated */
static void gp_interpolate_update_strokes(bContext *C, tGPDinterpolate *tgpi)
{
@ -265,6 +278,10 @@ static void gp_interpolate_set_points(bContext *C, tGPDinterpolate *tgpi)
tgpil->prevFrame = gpl->actframe;
tgpil->nextFrame = gpl->actframe->next;
/* Untag interpolated strokes to be sure nothing is pending. */
gp_interpolate_untag_strokes(tgpil->prevFrame);
gp_interpolate_untag_strokes(tgpil->nextFrame);
BLI_addtail(&tgpi->ilayers, tgpil);
/* create a new temporary frame */