diff options
Diffstat (limited to 'source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c')
-rw-r--r-- | source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c index deac2b17498..bc0464cb4f9 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c @@ -267,32 +267,12 @@ static void bakeModifier(Main *UNUSED(bmain), Object *ob) { HookGpencilModifierData *mmd = (HookGpencilModifierData *)md; - Scene *scene = DEG_get_evaluated_scene(depsgraph); - bGPdata *gpd = ob->data; - int oldframe = (int)DEG_get_ctime(depsgraph); if (mmd->object == NULL) { return; } - LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) { - LISTBASE_FOREACH (bGPDframe *, gpf, &gpl->frames) { - /* apply hook effects on this frame - * NOTE: this assumes that we don't want hook animation on non-keyframed frames - */ - CFRA = gpf->framenum; - BKE_scene_graph_update_for_newframe(depsgraph); - - /* compute hook effects on this frame */ - LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) { - deformStroke(md, depsgraph, ob, gpl, gpf, gps); - } - } - } - - /* return frame state and DB to original state */ - CFRA = oldframe; - BKE_scene_graph_update_for_newframe(depsgraph); + generic_bake_deform_stroke(depsgraph, md, ob, true, deformStroke); } static void freeData(GpencilModifierData *md) |