[Bf-blender-cvs] [ac521fc0bf9] greasepencil-object: Refresh gp cache while transform

Antonio Vazquez noreply at git.blender.org
Wed Oct 18 17:38:57 CEST 2017


Commit: ac521fc0bf9f1fb3bf368cdb4a7c8fb2e2fa2334
Author: Antonio Vazquez
Date:   Wed Oct 18 17:38:44 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rBac521fc0bf9f1fb3bf368cdb4a7c8fb2e2fa2334

Refresh gp cache while transform

The geometry cache must be recalculated when move keyframes in action editors.

===================================================================

M	source/blender/editors/transform/transform_generics.c

===================================================================

diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 0ebd242b07e..4a55003d0d1 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -83,6 +83,7 @@
 #include "BKE_mask.h"
 #include "BKE_utildefines.h"
 #include "BKE_workspace.h"
+#include "BKE_gpencil.h"
 
 #include "DEG_depsgraph.h"
 
@@ -345,6 +346,10 @@ static void recalcData_actedit(TransInfo *t)
 	if (ELEM(ac.datatype, ANIMCONT_GPENCIL, ANIMCONT_MASK)) {
 		/* flush transform values back to actual coordinates */
 		flushTransIntFrameActionData(t);
+		/* refresh gpencil cache */
+		if (ac.datatype == ANIMCONT_GPENCIL) {
+			BKE_gpencil_batch_cache_alldirty();
+		}
 	}
 	else {
 		/* get animdata blocks visible in editor, assuming that these will be the ones where things changed */



More information about the Bf-blender-cvs mailing list