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/blenkernel/intern/object_update.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/blenkernel/intern/object_update.c') diff --git a/source/blender/blenkernel/intern/object_update.c b/source/blender/blenkernel/intern/object_update.c index 49f5aa35f93..3a330ea0d5a 100644 --- a/source/blender/blenkernel/intern/object_update.c +++ b/source/blender/blenkernel/intern/object_update.c @@ -43,6 +43,7 @@ #include "BKE_displist.h" #include "BKE_editmesh.h" #include "BKE_effect.h" +#include "BKE_gpencil_modifier.h" #include "BKE_image.h" #include "BKE_key.h" #include "BKE_layer.h" @@ -215,6 +216,9 @@ void BKE_object_handle_data_update(Depsgraph *depsgraph, Scene *scene, Object *o case OB_LATTICE: BKE_lattice_modifiers_calc(depsgraph, scene, ob); break; + case OB_GPENCIL: + BKE_gpencil_modifiers_calc(depsgraph, scene, ob); + break; } /* particles */ -- cgit v1.2.3