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:
authorPhilipp Oeser <info@graphics-engineer.com>2020-03-03 19:22:52 +0300
committerNathan Letwory <nathan@blender.org>2020-03-10 15:31:43 +0300
commitc7e28f25d58ab1277712e6d8ed6293f8d39e1758 (patch)
treede55903af560573d760bb3b5cb5defe651049398
parent41c11fb265286ff193dc53e0e5a0c2c3bd973dc1 (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
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c3
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 cafdd72c7cd..7b4a0e7313c 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -2529,6 +2529,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);