diff options
-rw-r--r-- | source/blender/blenkernel/intern/gpencil_modifier.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/gpencil_modifier.c b/source/blender/blenkernel/intern/gpencil_modifier.c index 8b12e1b5fca..6f1896f055a 100644 --- a/source/blender/blenkernel/intern/gpencil_modifier.c +++ b/source/blender/blenkernel/intern/gpencil_modifier.c @@ -656,10 +656,12 @@ static void gpencil_copy_activeframe_to_eval( LISTBASE_FOREACH (bGPDlayer *, gpl_orig, &gpd_orig->layers) { if (gpl_eval != NULL) { - int remap_cfra = gpencil_remap_time_get(depsgraph, scene, ob, gpl_orig); + bGPDframe *gpf_orig = gpl_orig->actframe; - bGPDframe *gpf_orig = BKE_gpencil_layer_frame_get( - gpl_orig, remap_cfra, GP_GETFRAME_USE_PREV); + int remap_cfra = gpencil_remap_time_get(depsgraph, scene, ob, gpl_orig); + if (gpf_orig && gpf_orig->framenum != remap_cfra) { + gpf_orig = BKE_gpencil_layer_frame_get(gpl_orig, remap_cfra, GP_GETFRAME_USE_PREV); + } if (gpf_orig != NULL) { int gpf_index = BLI_findindex(&gpl_orig->frames, gpf_orig); |