[Bf-blender-cvs] [cf521a7f323] greasepencil-object: Update depsgrah tag while painting
Antonio Vazquez
noreply at git.blender.org
Thu Mar 22 16:10:35 CET 2018
Commit: cf521a7f323503d617445c95bdb0e6ca6c4a8a86
Author: Antonio Vazquez
Date: Thu Mar 22 16:10:22 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rBcf521a7f323503d617445c95bdb0e6ca6c4a8a86
Update depsgrah tag while painting
If this update is not done, the cow object used for display, does not show the current stroke.
===================================================================
M source/blender/editors/gpencil/gpencil_paint.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index bd641d0b4c9..0313831abc9 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -602,6 +602,9 @@ static short gp_stroke_addpoint(
gpd->sbuffer_size = 2;
}
+ /* tag depsgraph to update object */
+ DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
+
/* can keep carrying on this way :) */
return GP_STROKEADD_NORMAL;
}
@@ -732,6 +735,9 @@ static short gp_stroke_addpoint(
}
}
+ /* tag depsgraph to update object */
+ DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
+
/* check if another operation can still occur */
if (gpd->sbuffer_size == GP_STROKE_BUFFER_MAX)
return GP_STROKEADD_FULL;
@@ -803,7 +809,10 @@ static short gp_stroke_addpoint(
/* increment counters */
if (gpd->sbuffer_size == 0)
gpd->sbuffer_size++;
-
+
+ /* tag depsgraph to update object */
+ DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
+
return GP_STROKEADD_NORMAL;
}
More information about the Bf-blender-cvs
mailing list