From c1459a1e7f1410782d6a5b23f9457ecf0fbe4687 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 26 Jun 2018 12:31:06 +0200 Subject: Fix T55630: update issue between Object and TexPaint modes. Need to flush mesh DEG COW here, for some reason... --- source/blender/editors/sculpt_paint/paint_image.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/editors/sculpt_paint') diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 4342778a5d1..3c097095ddc 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -46,6 +46,7 @@ #include "IMB_imbuf_types.h" #include "DNA_brush_types.h" +#include "DNA_mesh_types.h" #include "DNA_node_types.h" #include "DNA_object_types.h" @@ -54,6 +55,7 @@ #include "BKE_brush.h" #include "BKE_main.h" #include "BKE_material.h" +#include "BKE_mesh.h" #include "BKE_node.h" #include "BKE_paint.h" #include "BKE_undo_system.h" @@ -1127,6 +1129,10 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op) toggle_paint_cursor(C, 1); } + Mesh *me = BKE_mesh_from_object(ob); + BLI_assert(me != NULL); + DEG_id_tag_update(&me->id, DEG_TAG_COPY_ON_WRITE); + WM_event_add_notifier(C, NC_SCENE | ND_MODE, scene); WM_msg_publish_rna_prop(mbus, &ob->id, ob, Object, mode); -- cgit v1.2.3