Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2019-08-02 10:50:33 +0300
committerAntonio Vazquez <blendergit@gmail.com>2019-08-02 10:50:33 +0300
commit31da3936b487ee4060635fe40c7c8affef92e372 (patch)
tree7b4ffbb23da7745eef39f151f37810ff8b9de852 /source/blender/gpencil_modifiers
parenta897c8e342f46d0fe40711796f496102957bab2b (diff)
GPencil: Add Frame parameter to modifier deformStroke Callback
This commit adds the frame to deformStroke Callback as a preparation for new modifiers that will need this variable. Actually, the existing modifiers are not using the frame.
Diffstat (limited to 'source/blender/gpencil_modifiers')
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilarmature.c3
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c3
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c3
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c3
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c10
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c3
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c3
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c3
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c3
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c3
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c3
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c3
12 files changed, 29 insertions, 14 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilarmature.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilarmature.c
index 1ef1068ee52..4297cbb545c 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilarmature.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilarmature.c
@@ -107,6 +107,7 @@ static void deformStroke(GpencilModifierData *md,
Depsgraph *UNUSED(depsgraph),
Object *ob,
bGPDlayer *UNUSED(gpl),
+ bGPDframe *UNUSED(gpf),
bGPDstroke *gps)
{
ArmatureGpencilModifierData *mmd = (ArmatureGpencilModifierData *)md;
@@ -140,7 +141,7 @@ static void bakeModifier(Main *bmain, Depsgraph *depsgraph, GpencilModifierData
/* compute armature effects on this frame */
for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) {
- deformStroke(md_eval, depsgraph, object_eval, gpl, gps);
+ deformStroke(md_eval, depsgraph, object_eval, gpl, gpf, gps);
}
}
}
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
index d54ec75862b..13329e4176d 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
@@ -65,6 +65,7 @@ static void deformStroke(GpencilModifierData *md,
Depsgraph *UNUSED(depsgraph),
Object *ob,
bGPDlayer *gpl,
+ bGPDframe *UNUSED(gpf),
bGPDstroke *gps)
{
@@ -128,7 +129,7 @@ static void bakeModifier(Main *bmain, Depsgraph *depsgraph, GpencilModifierData
copy_v4_v4(gps->runtime.tmp_stroke_rgba, gp_style->stroke_rgba);
copy_v4_v4(gps->runtime.tmp_fill_rgba, gp_style->fill_rgba);
- deformStroke(md, depsgraph, ob, gpl, gps);
+ deformStroke(md, depsgraph, ob, gpl, gpf, gps);
gpencil_apply_modifier_material(
bmain, ob, mat, gh_color, gps, (bool)(mmd->flag & GP_COLOR_CREATE_COLORS));
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c
index daca46c3a9a..d56b3217c9f 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c
@@ -190,6 +190,7 @@ static void deformStroke(GpencilModifierData *md,
Depsgraph *UNUSED(depsgraph),
Object *ob,
bGPDlayer *gpl,
+ bGPDframe *UNUSED(gpf),
bGPDstroke *gps)
{
HookGpencilModifierData *mmd = (HookGpencilModifierData *)md;
@@ -285,7 +286,7 @@ static void bakeModifier(Main *bmain, Depsgraph *depsgraph, GpencilModifierData
/* compute hook effects on this frame */
for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) {
- deformStroke(md, depsgraph, ob, gpl, gps);
+ deformStroke(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 da2b4214da1..aa5015bac35 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c
@@ -70,6 +70,7 @@ static void deformStroke(GpencilModifierData *md,
Depsgraph *UNUSED(depsgraph),
Object *ob,
bGPDlayer *gpl,
+ bGPDframe *UNUSED(gpf),
bGPDstroke *gps)
{
LatticeGpencilModifierData *mmd = (LatticeGpencilModifierData *)md;
@@ -134,7 +135,7 @@ static void bakeModifier(Main *bmain, Depsgraph *depsgraph, GpencilModifierData
/* compute lattice effects on this frame */
for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) {
- deformStroke(md, depsgraph, ob, gpl, gps);
+ deformStroke(md, depsgraph, ob, gpl, gpf, gps);
}
}
}
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c
index e891b6dea12..2c4d99adeee 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c
@@ -72,8 +72,12 @@ static bool dependsOnTime(GpencilModifierData *md)
}
/* aply noise effect based on stroke direction */
-static void deformStroke(
- GpencilModifierData *md, Depsgraph *depsgraph, Object *ob, bGPDlayer *gpl, bGPDstroke *gps)
+static void deformStroke(GpencilModifierData *md,
+ Depsgraph *depsgraph,
+ Object *ob,
+ bGPDlayer *gpl,
+ bGPDframe *UNUSED(gpf),
+ bGPDstroke *gps)
{
NoiseGpencilModifierData *mmd = (NoiseGpencilModifierData *)md;
bGPDspoint *pt0, *pt1;
@@ -239,7 +243,7 @@ static void bakeModifier(struct Main *UNUSED(bmain),
for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
for (bGPDframe *gpf = gpl->frames.first; gpf; gpf = gpf->next) {
for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) {
- deformStroke(md, depsgraph, ob, gpl, gps);
+ deformStroke(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 345a6c34f23..399fc407455 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c
@@ -64,6 +64,7 @@ static void deformStroke(GpencilModifierData *md,
Depsgraph *UNUSED(depsgraph),
Object *ob,
bGPDlayer *gpl,
+ bGPDframe *UNUSED(gpf),
bGPDstroke *gps)
{
OffsetGpencilModifierData *mmd = (OffsetGpencilModifierData *)md;
@@ -116,7 +117,7 @@ static void bakeModifier(struct Main *UNUSED(bmain),
for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
for (bGPDframe *gpf = gpl->frames.first; gpf; gpf = gpf->next) {
for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) {
- deformStroke(md, depsgraph, ob, gpl, gps);
+ deformStroke(md, depsgraph, ob, gpl, gpf, gps);
}
}
}
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c
index 587cf527118..36a1c3db700 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c
@@ -67,6 +67,7 @@ static void deformStroke(GpencilModifierData *md,
Depsgraph *UNUSED(depsgraph),
Object *ob,
bGPDlayer *gpl,
+ bGPDframe *UNUSED(gpf),
bGPDstroke *gps)
{
OpacityGpencilModifierData *mmd = (OpacityGpencilModifierData *)md;
@@ -146,7 +147,7 @@ static void bakeModifier(Main *bmain, Depsgraph *depsgraph, GpencilModifierData
copy_v4_v4(gps->runtime.tmp_stroke_rgba, gp_style->stroke_rgba);
copy_v4_v4(gps->runtime.tmp_fill_rgba, gp_style->fill_rgba);
- deformStroke(md, depsgraph, ob, gpl, gps);
+ deformStroke(md, depsgraph, ob, gpl, gpf, gps);
gpencil_apply_modifier_material(
bmain, ob, mat, gh_color, gps, (bool)(mmd->flag & GP_OPACITY_CREATE_COLORS));
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c
index 5e5c60645ad..746a689c08e 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c
@@ -57,6 +57,7 @@ static void deformStroke(GpencilModifierData *md,
Depsgraph *UNUSED(depsgraph),
Object *ob,
bGPDlayer *gpl,
+ bGPDframe *UNUSED(gpf),
bGPDstroke *gps)
{
SimplifyGpencilModifierData *mmd = (SimplifyGpencilModifierData *)md;
@@ -95,7 +96,7 @@ static void bakeModifier(struct Main *UNUSED(bmain),
for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
for (bGPDframe *gpf = gpl->frames.first; gpf; gpf = gpf->next) {
for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) {
- deformStroke(md, depsgraph, ob, gpl, gps);
+ deformStroke(md, depsgraph, ob, gpl, gpf, gps);
}
}
}
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c
index 866f229cc51..7c639bd8af0 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c
@@ -60,6 +60,7 @@ static void deformStroke(GpencilModifierData *md,
Depsgraph *UNUSED(depsgraph),
Object *ob,
bGPDlayer *gpl,
+ bGPDframe *UNUSED(gpf),
bGPDstroke *gps)
{
SmoothGpencilModifierData *mmd = (SmoothGpencilModifierData *)md;
@@ -123,7 +124,7 @@ static void bakeModifier(struct Main *UNUSED(bmain),
for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
for (bGPDframe *gpf = gpl->frames.first; gpf; gpf = gpf->next) {
for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) {
- deformStroke(md, depsgraph, ob, gpl, gps);
+ deformStroke(md, depsgraph, ob, gpl, gpf, gps);
}
}
}
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c
index a30ad2b898a..c8962cd58c9 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c
@@ -59,6 +59,7 @@ static void deformStroke(GpencilModifierData *md,
Depsgraph *UNUSED(depsgraph),
Object *ob,
bGPDlayer *gpl,
+ bGPDframe *UNUSED(gpf),
bGPDstroke *gps)
{
SubdivGpencilModifierData *mmd = (SubdivGpencilModifierData *)md;
@@ -89,7 +90,7 @@ static void bakeModifier(struct Main *UNUSED(bmain),
for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
for (bGPDframe *gpf = gpl->frames.first; gpf; gpf = gpf->next) {
for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) {
- deformStroke(md, depsgraph, ob, gpl, gps);
+ deformStroke(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 4a2a1783127..bf4f45b10af 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c
@@ -83,6 +83,7 @@ static void deformStroke(GpencilModifierData *md,
Depsgraph *UNUSED(depsgraph),
Object *ob,
bGPDlayer *gpl,
+ bGPDframe *UNUSED(gpf),
bGPDstroke *gps)
{
ThickGpencilModifierData *mmd = (ThickGpencilModifierData *)md;
@@ -143,7 +144,7 @@ static void bakeModifier(struct Main *UNUSED(bmain),
for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
for (bGPDframe *gpf = gpl->frames.first; gpf; gpf = gpf->next) {
for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) {
- deformStroke(md, depsgraph, ob, gpl, gps);
+ deformStroke(md, depsgraph, ob, gpl, gpf, gps);
}
}
}
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c b/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
index 289cae955ba..d70d975c3a7 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
@@ -65,6 +65,7 @@ static void deformStroke(GpencilModifierData *md,
Depsgraph *UNUSED(depsgraph),
Object *ob,
bGPDlayer *gpl,
+ bGPDframe *UNUSED(gpf),
bGPDstroke *gps)
{
TintGpencilModifierData *mmd = (TintGpencilModifierData *)md;
@@ -134,7 +135,7 @@ static void bakeModifier(Main *bmain, Depsgraph *depsgraph, GpencilModifierData
copy_v4_v4(gps->runtime.tmp_stroke_rgba, gp_style->stroke_rgba);
copy_v4_v4(gps->runtime.tmp_fill_rgba, gp_style->fill_rgba);
- deformStroke(md, depsgraph, ob, gpl, gps);
+ deformStroke(md, depsgraph, ob, gpl, gpf, gps);
gpencil_apply_modifier_material(
bmain, ob, mat, gh_color, gps, (bool)(mmd->flag & GP_TINT_CREATE_COLORS));