Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2022-04-05 21:00:31 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2022-04-05 21:00:31 +0300
commita3e122b9aec59fc303c2375a78183cfb8642c14f (patch)
treeb3ebfc454b6d4368743734a28e1f25f0daf78812 /source/blender/editors
parentfc8bcd26c0be15cb9ace6f6289f0275547d73c94 (diff)
Curves: fix missing updates switching to sculpt mode
This would cause the viewport to draw stale data until a stroke is done.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_ops.cc4
1 files changed, 4 insertions, 0 deletions
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)