Commit: c1459a1e7f1410782d6a5b23f9457ecf0fbe4687
Author: Bastien Montagne
Date:   Tue Jun 26 12:31:06 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBc1459a1e7f1410782d6a5b23f9457ecf0fbe4687

Fix T55630: update issue between Object and TexPaint modes.

Need to flush mesh DEG COW here, for some reason...

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

M       source/blender/editors/sculpt_paint/paint_image.c

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

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);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to