[Bf-blender-cvs] [c420399f4da] master: Fix T91421: Length modifier bake influence check.
YimingWu
noreply at git.blender.org
Wed Sep 15 12:20:06 CEST 2021
Commit: c420399f4da8f1190dd75751845dd78e100c7e2e
Author: YimingWu
Date: Wed Sep 15 18:19:24 2021 +0800
Branches: master
https://developer.blender.org/rBc420399f4da8f1190dd75751845dd78e100c7e2e
Fix T91421: Length modifier bake influence check.
Reviewed By: Antonio Vazquez (antoniov)
Differential Revision: https://developer.blender.org/D12496
===================================================================
M source/blender/gpencil_modifiers/intern/MOD_gpencillength.c
===================================================================
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;
More information about the Bf-blender-cvs
mailing list