From 8e01389a4e34b81c28aea7ac7fbb590b314624e3 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 4 Jun 2012 15:13:36 +0000 Subject: [PATCH] Fix #31559: second 3D viewport does not update when paiting vertex/weight Added notification at the end of weight/vertex paint stroke so all opened viewports would be updated (same was already done for sculpt mode). --- source/blender/editors/sculpt_paint/paint_vertex.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index eb79989b90b..43981770784 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -2461,6 +2461,8 @@ static void wpaint_stroke_done(const bContext *C, struct PaintStroke *stroke) } DAG_id_tag_update(ob->data, 0); + + WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); } @@ -2954,6 +2956,8 @@ static void vpaint_stroke_done(const bContext *C, struct PaintStroke *stroke) { ToolSettings *ts = CTX_data_tool_settings(C); struct VPaintData *vpd = paint_stroke_mode_data(stroke); + ViewContext *vc = &vpd->vc; + Object *ob = vc->obact; if (vpd->vertexcosnos) MEM_freeN(vpd->vertexcosnos); @@ -2966,6 +2970,8 @@ static void vpaint_stroke_done(const bContext *C, struct PaintStroke *stroke) BLI_memarena_free(vpd->polyfacemap_arena); } + WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); + MEM_freeN(vpd); }