diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2020-03-03 19:22:52 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2020-03-03 21:38:40 +0300 |
commit | 31aefdeec5a6e098acabee80517aa6ca03933808 (patch) | |
tree | 2c3c550664b7d0b8918840cdc1084f81a09b9719 /source | |
parent | 059f3c1a7eb8a48aa06467e19cce4daa29091c1a (diff) |
Fix T72028: Crash switching to vertex paint
This would happen when done from editmode, on a mesh with any modifier,
after adding/removing geometry in editmode.
Similar to rBba0870713b9b (which did this for weightpaint and sculpt
already), ensure an evaluated depsgraph, otherwise
'runtime.mesh_deform_eval' would not be up to date causing problems
later.
Maniphest Tasks: T72028
Differential Revision: https://developer.blender.org/D7011
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 6971182e5b8..684f53971a7 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -2524,6 +2524,9 @@ static int vpaint_mode_toggle_exec(bContext *C, wmOperator *op) } else { Depsgraph *depsgraph = CTX_data_depsgraph_on_load(C); + if (depsgraph) { + depsgraph = CTX_data_ensure_evaluated_depsgraph(C); + } wmWindowManager *wm = CTX_wm_manager(C); ED_object_vpaintmode_enter_ex(bmain, depsgraph, wm, scene, ob); BKE_paint_toolslots_brush_validate(bmain, &ts->vpaint->paint); |