diff options
author | YimingWu <xp8110@outlook.com> | 2021-09-15 13:19:24 +0300 |
---|---|---|
committer | YimingWu <xp8110@outlook.com> | 2021-09-15 13:19:56 +0300 |
commit | c420399f4da8f1190dd75751845dd78e100c7e2e (patch) | |
tree | 64b9d3b22a7bf0263354c7cae2ac4e3a86642e98 /source/blender | |
parent | 429136c89f653a0aee3253dae7ea90d524d11003 (diff) |
Fix T91421: Length modifier bake influence check.
Reviewed By: Antonio Vazquez (antoniov)
Differential Revision: https://developer.blender.org/D12496
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/gpencil_modifiers/intern/MOD_gpencillength.c | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillength.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillength.c index 857c683d95a..908918b8591 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencillength.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillength.c @@ -108,27 +108,6 @@ static void applyLength(LengthGpencilModifierData *lmd, bGPdata *gpd, bGPDstroke } } -static void bakeModifier(Main *UNUSED(bmain), - Depsgraph *UNUSED(depsgraph), - GpencilModifierData *md, - Object *ob) -{ - - bGPdata *gpd = ob->data; - - LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) { - LISTBASE_FOREACH (bGPDframe *, gpf, &gpl->frames) { - LengthGpencilModifierData *lmd = (LengthGpencilModifierData *)md; - LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) { - applyLength(lmd, gpd, gps); - } - } - } -} - -/* -------------------------------- */ - -/* Generic "generateStrokes" callback */ static void deformStroke(GpencilModifierData *md, Depsgraph *UNUSED(depsgraph), Object *ob, @@ -154,6 +133,24 @@ static void deformStroke(GpencilModifierData *md, } } +static void bakeModifier(Main *UNUSED(bmain), + Depsgraph *depsgraph, + GpencilModifierData *md, + Object *ob) +{ + + bGPdata *gpd = ob->data; + + LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) { + LISTBASE_FOREACH (bGPDframe *, gpf, &gpl->frames) { + LengthGpencilModifierData *lmd = (LengthGpencilModifierData *)md; + LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) { + deformStroke(md, depsgraph, ob, gpl, gpf, gps); + } + } + } +} + static void foreachIDLink(GpencilModifierData *md, Object *ob, IDWalkFunc walk, void *userData) { LengthGpencilModifierData *mmd = (LengthGpencilModifierData *)md; |