From a3e122b9aec59fc303c2375a78183cfb8642c14f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dietrich?= Date: Tue, 5 Apr 2022 20:00:31 +0200 Subject: Curves: fix missing updates switching to sculpt mode This would cause the viewport to draw stale data until a stroke is done. --- source/blender/editors/sculpt_paint/curves_sculpt_ops.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source') diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc index 893b2640427..8afdd7f3481 100644 --- a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc +++ b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc @@ -660,6 +660,10 @@ static void curves_sculptmode_enter(bContext *C) ob->mode = OB_MODE_SCULPT_CURVES; paint_cursor_start(&curves_sculpt->paint, CURVES_SCULPT_mode_poll_view3d); + + /* Update for mode change. */ + DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE); + WM_event_add_notifier(C, NC_SCENE | ND_MODE, nullptr); } static void curves_sculptmode_exit(bContext *C) -- cgit v1.2.3