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>2022-03-14 18:10:03 +0300
committerAntonio Vazquez <blendergit@gmail.com>2022-03-14 18:13:59 +0300
commitcff6eb65804da3a06bde3c9152bec26e01a24992 (patch)
treeb3d49cf7281568000695116fe990828660ed48c0 /source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
parent8c4ddd5dde3a5f5ae0375c71e379e0fac287e3e6 (diff)
Cleanup: Remove duplicate Bake modifier code
This patch remove all duplicate code for the same Bake modifier logic. Still some modifiers need custom bake functions and cannot use this generic bake.
Diffstat (limited to 'source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c')
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c b/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
index c594b042643..8fa14496616 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
@@ -261,32 +261,12 @@ static void bakeModifier(Main *UNUSED(bmain),
Object *ob)
{
TintGpencilModifierData *mmd = (TintGpencilModifierData *)md;
- Scene *scene = DEG_get_evaluated_scene(depsgraph);
- bGPdata *gpd = ob->data;
- int oldframe = (int)DEG_get_ctime(depsgraph);
if ((mmd->type == GP_TINT_GRADIENT) && (mmd->object == NULL)) {
return;
}
- LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) {
- LISTBASE_FOREACH (bGPDframe *, gpf, &gpl->frames) {
- /* apply effects on this frame
- * NOTE: this assumes that we don't want animation on non-keyframed frames
- */
- CFRA = gpf->framenum;
- BKE_scene_graph_update_for_newframe(depsgraph);
-
- /* compute 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)