Fix update issue in VPaint mode.
authorBastien Montagne <montagne29@wanadoo.fr>
Wed, 6 Jun 2018 10:39:49 +0000 (12:39 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Wed, 6 Jun 2018 10:42:01 +0000 (12:42 +0200)
Need to flush the changes through DEG CoW, otherwise drawing code would
not see them in some cases...

source/blender/editors/sculpt_paint/paint_vertex.c

index a6b5ae1af291bc078f2751d6c46a2ac1bdf1c79a..52c096b712ed2222be4e27618c8861f881874366 100644 (file)
@@ -3143,6 +3143,10 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
                 * avoid this if we can! */
                DEG_id_tag_update(ob->data, 0);
        }
+       else {
+               /* Flush changes through DEG. */
+               DEG_id_tag_update(ob->data, DEG_TAG_COPY_ON_WRITE);
+       }
 }
 
 static void vpaint_stroke_done(const bContext *C, struct PaintStroke *stroke)