Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2018-11-13 19:08:52 +0300
committerAntonioya <blendergit@gmail.com>2018-11-13 19:09:29 +0300
commit81caa7fd6d2360c45c6cacf80eaca9627ca9a480 (patch)
treea9df9037e3e1ddd7130803badc3cf6c467c708bb /source/blender/editors/gpencil/gpencil_primitive.c
parentc2dc5dfa0de67f2ec60d80594027da29794aec1e (diff)
GP: Fix wrong fill texture when draw primitives
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_primitive.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_primitive.c5
1 files changed, 5 insertions, 0 deletions
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);
}