diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-05-01 11:14:20 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-05-01 11:14:20 +0300 |
commit | 2ce94cc24b2ce5fdb89ae5d503aaabe22687e285 (patch) | |
tree | 3ae7dd9a443c4205c0ba90f1fbaf3eaf0350ab8e /source/blender/blenkernel/BKE_context.h | |
parent | af508a1e39c002db8e07886e042378c12b8fc136 (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/blenkernel/BKE_context.h')
-rw-r--r-- | source/blender/blenkernel/BKE_context.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h index e50c33e258c..12525fe9a50 100644 --- a/source/blender/blenkernel/BKE_context.h +++ b/source/blender/blenkernel/BKE_context.h @@ -322,6 +322,11 @@ int CTX_data_editable_gpencil_strokes(const bContext *C, ListBase *list); struct Depsgraph *CTX_data_depsgraph(const bContext *C); +/* Will Return NULL if depsgraph is not allocated yet. + * Only used by handful of operators which are run on file load. + */ +struct Depsgraph *CTX_data_depsgraph_on_load(const bContext *C); + #ifdef __cplusplus } #endif |