[Bf-blender-cvs] [81caa7fd6d2] blender2.8: GP: Fix wrong fill texture when draw primitives

Antonioya noreply at git.blender.org
Tue Nov 13 17:09:38 CET 2018


Commit: 81caa7fd6d2360c45c6cacf80eaca9627ca9a480
Author: Antonioya
Date:   Tue Nov 13 17:08:52 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB81caa7fd6d2360c45c6cacf80eaca9627ca9a480

GP: Fix wrong fill texture when draw primitives

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

M	source/blender/editors/gpencil/gpencil_primitive.c

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

diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c
index cc93e0433f1..a9c52741e61 100644
--- a/source/blender/editors/gpencil/gpencil_primitive.c
+++ b/source/blender/editors/gpencil/gpencil_primitive.c
@@ -387,6 +387,7 @@ static void gp_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi)
 	/* free temp data */
 	MEM_SAFE_FREE(points2D);
 
+	DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
 	DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
 	WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL);
 }
@@ -562,6 +563,7 @@ static void gpencil_primitive_interaction_end(bContext *C, wmOperator *op, wmWin
 	if (gps) {
 		gps->thickness = tgpi->brush->size;
 		gps->flag |= GP_STROKE_RECALC_CACHES;
+		gps->tot_triangles = 0;
 	}
 
 	/* transfer stroke from temporary buffer to the actual frame */
@@ -581,6 +583,9 @@ static void gpencil_primitive_interaction_end(bContext *C, wmOperator *op, wmWin
 		}
 	}
 
+	DEG_id_tag_update(&tgpi->gpd->id, DEG_TAG_COPY_ON_WRITE);
+	DEG_id_tag_update(&tgpi->gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+
 	/* clean up temp data */
 	gpencil_primitive_exit(C, op);
 }



More information about the Bf-blender-cvs mailing list