[Bf-blender-cvs] [8fd6e894bab] temp-gpencil-bezier-stroke-type: GPencil: Fix Bakemodifier for Beziers
Antonio Vazquez
noreply at git.blender.org
Wed Mar 31 16:26:25 CEST 2021
Commit: 8fd6e894bab42b05c97ec53d535a26193a42004e
Author: Antonio Vazquez
Date: Wed Mar 31 16:26:21 2021 +0200
Branches: temp-gpencil-bezier-stroke-type
https://developer.blender.org/rB8fd6e894bab42b05c97ec53d535a26193a42004e
GPencil: Fix Bakemodifier for Beziers
Only the modifiers with different `deformBezier` function need the fix.
===================================================================
M source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c
M source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c
M source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c
M source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c
===================================================================
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c
index cda11c3ceb6..cddcddfcd5b 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c
@@ -355,7 +355,12 @@ static void bakeModifier(Main *UNUSED(bmain),
/* compute hook effects on this frame */
LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) {
- deformPolyline(md, depsgraph, ob, gpl, gpf, gps);
+ if (!GPENCIL_STROKE_TYPE_BEZIER(gps)) {
+ deformPolyline(md, depsgraph, ob, gpl, gpf, gps);
+ }
+ else {
+ deformBezier(md, depsgraph, ob, gpl, gpf, gps);
+ }
}
}
}
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c
index cec22bfb97b..b5d35acd310 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c
@@ -205,7 +205,12 @@ static void bakeModifier(Main *UNUSED(bmain),
/* Compute lattice effects on this frame. */
LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) {
- deformPolyline(md, depsgraph, ob, gpl, gpf, gps);
+ if (!GPENCIL_STROKE_TYPE_BEZIER(gps)) {
+ deformPolyline(md, depsgraph, ob, gpl, gpf, gps);
+ }
+ else {
+ deformBezier(md, depsgraph, ob, gpl, gpf, gps);
+ }
}
}
}
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c b/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c
index 04bb41356d2..708ddc75fa0 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c
@@ -186,7 +186,12 @@ static void bakeModifier(struct Main *UNUSED(bmain),
LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) {
LISTBASE_FOREACH (bGPDframe *, gpf, &gpl->frames) {
LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) {
- deformPolyline(md, depsgraph, ob, gpl, gpf, gps);
+ if (!GPENCIL_STROKE_TYPE_BEZIER(gps)) {
+ deformPolyline(md, depsgraph, ob, gpl, gpf, gps);
+ }
+ else {
+ deformBezier(md, depsgraph, ob, gpl, gpf, gps);
+ }
}
}
}
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c
index 33d8883dfb1..44dfc47cc9c 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c
@@ -220,7 +220,12 @@ static void bakeModifier(struct Main *UNUSED(bmain),
LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) {
LISTBASE_FOREACH (bGPDframe *, gpf, &gpl->frames) {
LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) {
- deformPolyline(md, depsgraph, ob, gpl, gpf, gps);
+ if (!GPENCIL_STROKE_TYPE_BEZIER(gps)) {
+ deformPolyline(md, depsgraph, ob, gpl, gpf, gps);
+ }
+ else {
+ deformBezier(md, depsgraph, ob, gpl, gpf, gps);
+ }
}
}
}
More information about the Bf-blender-cvs
mailing list