From ee4ec69b28047629a1c153af356757a8fac5cee9 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Fri, 23 Aug 2019 23:10:41 +0200 Subject: Fix T66924 : Move GPencil Modifiers evaluation to Depsgraph Before, the evaluation of modifers were done in draw manager. The reason of the old design was grease pencil was designed before depsgraph was in place. This commit moves this logic to depsgraph to follow general design and reduce Draw Manager complexity. Also, this is required in order to use modifiers in Edit modes. Really, there is nothing really new in the creation of derived data, only the logic has been moved to depsgraph, but the main logic is the same. In order to get a reference to the original stroke and points, a pointer is added to Runtime data as part of the evaluated data. These pointers allow to know and use the original data. As the modifiers now are evaluated in Depsgraph, the evaluated stroke is usable in Edit modes, so now it's possible to work with the evaluated version instead to use a "ghost" of the final image over the original geometry as work today. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5470 --- source/blender/draw/engines/gpencil/gpencil_engine.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/draw/engines/gpencil/gpencil_engine.c') diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c index efe67e1ead0..9efae54b376 100644 --- a/source/blender/draw/engines/gpencil/gpencil_engine.c +++ b/source/blender/draw/engines/gpencil/gpencil_engine.c @@ -405,10 +405,10 @@ void GPENCIL_cache_init(void *vedata) } /* save simplify flags (can change while drawing, so it's better to save) */ - stl->storage->simplify_fill = GP_SIMPLIFY_FILL(scene, stl->storage->is_playing); - stl->storage->simplify_modif = GP_SIMPLIFY_MODIF(scene, stl->storage->is_playing); - stl->storage->simplify_fx = GP_SIMPLIFY_FX(scene, stl->storage->is_playing); - stl->storage->simplify_blend = GP_SIMPLIFY_BLEND(scene, stl->storage->is_playing); + stl->storage->simplify_fill = GPENCIL_SIMPLIFY_FILL(scene, stl->storage->is_playing); + stl->storage->simplify_modif = GPENCIL_SIMPLIFY_MODIF(scene, stl->storage->is_playing); + stl->storage->simplify_fx = GPENCIL_SIMPLIFY_FX(scene, stl->storage->is_playing); + stl->storage->simplify_blend = GPENCIL_SIMPLIFY_BLEND(scene, stl->storage->is_playing); /* xray mode */ if (v3d) { -- cgit v1.2.3