[Bf-blender-cvs] [619d9896000] greasepencil-object: Update depsgraph for stroke transforms

Antonio Vazquez noreply at git.blender.org
Thu Mar 22 16:45:56 CET 2018


Commit: 619d9896000ce1182766972a768c726f5660973c
Author: Antonio Vazquez
Date:   Thu Mar 22 16:45:44 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rB619d9896000ce1182766972a768c726f5660973c

Update depsgraph for stroke transforms

This is required to work with COW

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

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

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

diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index e3d88b67a40..d0b0afc3961 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -84,6 +84,7 @@
 #include "ED_mesh.h"
 #include "ED_clip.h"
 #include "ED_node.h"
+#include "ED_gpencil.h"
 
 #include "WM_types.h"
 #include "WM_api.h"
@@ -100,6 +101,8 @@
 
 #include "transform.h"
 
+#include "DEG_depsgraph.h"
+
 /* Disabling, since when you type you know what you are doing, and being able to set it to zero is handy. */
 // #define USE_NUM_NO_ZERO
 
@@ -568,6 +571,10 @@ void removeAspectRatio(TransInfo *t, float vec[2])
 static void viewRedrawForce(const bContext *C, TransInfo *t)
 {
 	if (t->options & CTX_GPENCIL_STROKES) {
+		bGPdata *gpd = ED_gpencil_data_get_active(C);
+		if (gpd) {
+			DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
+		}
 		WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL);
 	}
 	else if (t->spacetype == SPACE_VIEW3D) {



More information about the Bf-blender-cvs mailing list