diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencildash.c b/source/blender/gpencil_modifiers/intern/MOD_gpencildash.c index 2ff2a0eb1fa..51b547a3e46 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencildash.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencildash.c @@ -12,13 +12,6 @@ #include "BLI_math_vector.h" #include "BLI_string.h" -#include "DNA_defaults.h" -#include "DNA_gpencil_modifier_types.h" -#include "DNA_gpencil_types.h" -#include "DNA_meshdata_types.h" -#include "DNA_object_types.h" -#include "DNA_screen_types.h" - #include "BKE_gpencil.h" #include "BKE_gpencil_geom.h" #include "BKE_gpencil_modifier.h" @@ -26,7 +19,14 @@ #include "BKE_main.h" #include "BKE_modifier.h" #include "BKE_screen.h" - +#include "DEG_depsgraph_query.h" +#include "DNA_defaults.h" +#include "DNA_gpencil_modifier_types.h" +#include "DNA_gpencil_types.h" +#include "DNA_meshdata_types.h" +#include "DNA_object_types.h" +#include "DNA_scene_types.h" +#include "DNA_screen_types.h" #include "MEM_guardedalloc.h" #include "UI_interface.h" @@ -254,11 +254,11 @@ static bool isDisabled(GpencilModifierData *md, int UNUSED(userRenderParams)) /* Generic "generateStrokes" callback */ static void generateStrokes(GpencilModifierData *md, Depsgraph *depsgraph, Object *ob) { + Scene *scene = DEG_get_evaluated_scene(depsgraph); bGPdata *gpd = ob->data; LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) { - BKE_gpencil_frame_active_set(depsgraph, gpd); - bGPDframe *gpf = gpl->actframe; + bGPDframe *gpf = BKE_gpencil_frame_retime_get(depsgraph, scene, ob, gpl); if (gpf == NULL) { continue; }