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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-05-01 11:14:20 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-05-01 11:14:20 +0300
commit2ce94cc24b2ce5fdb89ae5d503aaabe22687e285 (patch)
tree3ae7dd9a443c4205c0ba90f1fbaf3eaf0350ab8e /source/blender/editors/sculpt_paint/paint_vertex.c
parentaf508a1e39c002db8e07886e042378c12b8fc136 (diff)
Fix crash opening files saved in sculpt/vertex paint modes
Skip access to any evaluated data when operator is run on file load, we don't have depsgraph evaluated yet. In this case we skip part of sculpt session initialization, since it will be done during depsgraph evaluation which happens after DEG_on_visible_update(). We can not skip sculpt session initialization since during normal operation we want all the data to be initialized on mode change, and not on initial brush stroke.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_vertex.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 1775d4b9c8b..7e9c98d3822 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -2342,7 +2342,7 @@ static int vpaint_mode_toggle_exec(bContext *C, wmOperator *op)
ED_object_vpaintmode_exit_ex(ob);
}
else {
- Depsgraph *depsgraph = CTX_data_depsgraph(C);
+ Depsgraph *depsgraph = CTX_data_depsgraph_on_load(C);
wmWindowManager *wm = CTX_wm_manager(C);
ED_object_vpaintmode_enter_ex(depsgraph, wm, scene, ob);
}