diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-31 13:50:15 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-31 18:17:03 +0300 |
commit | 151f69a5c214691de0665affcd8a49cecd6dd0aa (patch) | |
tree | 9ae399a893921e8ba0829657f211d9540e1332e2 /source/blender/editors/sculpt_paint/sculpt_undo.c | |
parent | 692891f69ea42af0ba890f5f92cbd1a3260442c9 (diff) |
Fix various missing updates in sculpt mode, when changing modifiers and dyntopo
This restores the code that updates the sculpt session and PBVH from dependency
graph evaluation.
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_undo.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_undo.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index 965f31cbb6b..3c26a0e2541 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -129,8 +129,6 @@ static bool sculpt_undo_restore_deformed( static bool sculpt_undo_restore_coords(bContext *C, SculptUndoNode *unode) { - Scene *scene = CTX_data_scene(C); - Sculpt *sd = CTX_data_tool_settings(C)->sculpt; ViewLayer *view_layer = CTX_data_view_layer(C); Object *ob = OBACT(view_layer); Depsgraph *depsgraph = CTX_data_depsgraph(C); @@ -151,7 +149,7 @@ static bool sculpt_undo_restore_coords(bContext *C, SculptUndoNode *unode) if (kb) { ob->shapenr = BLI_findindex(&key->block, kb) + 1; - BKE_sculpt_update_mesh_elements(depsgraph, scene, sd, ob, false, false); + BKE_sculpt_update_object_for_edit(depsgraph, ob, false, false); WM_event_add_notifier(C, NC_OBJECT | ND_DATA, ob); } else { @@ -460,7 +458,6 @@ static int sculpt_undo_bmesh_restore(bContext *C, static void sculpt_undo_restore_list(bContext *C, ListBase *lb) { Scene *scene = CTX_data_scene(C); - Sculpt *sd = CTX_data_tool_settings(C)->sculpt; ViewLayer *view_layer = CTX_data_view_layer(C); Object *ob = OBACT(view_layer); Depsgraph *depsgraph = CTX_data_depsgraph(C); @@ -484,7 +481,7 @@ static void sculpt_undo_restore_list(bContext *C, ListBase *lb) DEG_id_tag_update(&ob->id, ID_RECALC_SHADING); - BKE_sculpt_update_mesh_elements(depsgraph, scene, sd, ob, false, need_mask); + BKE_sculpt_update_object_for_edit(depsgraph, ob, false, need_mask); if (lb->first && sculpt_undo_bmesh_restore(C, lb->first, ob, ss)) { return; |