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/paint_vertex.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/paint_vertex.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index f9db589405e..bdb8ccb09a4 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -1014,12 +1014,12 @@ static void vertex_paint_init_session(Depsgraph *depsgraph, BLI_assert(ob->sculpt == NULL); ob->sculpt = MEM_callocN(sizeof(SculptSession), "sculpt session"); ob->sculpt->mode_type = object_mode; - BKE_sculpt_update_mesh_elements(depsgraph, scene, scene->toolsettings->sculpt, ob, false, false); + BKE_sculpt_update_object_for_edit(depsgraph, ob, false, false); } -static void vertex_paint_init_stroke(Depsgraph *depsgraph, Scene *scene, Object *ob) +static void vertex_paint_init_stroke(Depsgraph *depsgraph, Object *ob) { - BKE_sculpt_update_mesh_elements(depsgraph, scene, scene->toolsettings->sculpt, ob, false, false); + BKE_sculpt_update_object_for_edit(depsgraph, ob, false, false); } static void vertex_paint_init_session_data(const ToolSettings *ts, Object *ob) @@ -1619,7 +1619,7 @@ static bool wpaint_stroke_test_start(bContext *C, wmOperator *op, const float mo } /* If not previously created, create vertex/weight paint mode session data */ - vertex_paint_init_stroke(depsgraph, scene, ob); + vertex_paint_init_stroke(depsgraph, ob); vwpaint_update_cache_invariants(C, vp, ss, op, mouse); vertex_paint_init_session_data(ts, ob); @@ -2646,7 +2646,7 @@ static bool vpaint_stroke_test_start(bContext *C, struct wmOperator *op, const f } /* If not previously created, create vertex/weight paint mode session data */ - vertex_paint_init_stroke(depsgraph, scene, ob); + vertex_paint_init_stroke(depsgraph, ob); vwpaint_update_cache_invariants(C, vp, ss, op, mouse); vertex_paint_init_session_data(ts, ob); |