diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-01-30 12:44:15 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-01-30 12:44:15 +0300 |
commit | fbfe360cb13df5a6b47a86bf4cabd16e3bd92262 (patch) | |
tree | 14e86dca0250350c95eba472f56a916010b11b0d /source/blender/editors | |
parent | a1ae04d15a9faaa9b4dc59e8a5bec02a7c69b255 (diff) |
Fix T60974: Dyntopo crash on undo after object deleted
Add the ability for undo steps to request memfile undo step added after
them, useful for mode switching, where we need the data to exist for
undo to enter the mode.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_undo.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index d3bcee3dc2e..0355f8e933b 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -1055,6 +1055,11 @@ static bool sculpt_undosys_step_encode(struct bContext *UNUSED(C), UndoStep *us_ * to the current 'SculptUndoStep' added by encode_init. */ SculptUndoStep *us = (SculptUndoStep *)us_p; us->step.data_size = us->data.undo_size; + + SculptUndoNode *unode = us->data.nodes.last; + if (unode && unode->type == SCULPT_UNDO_DYNTOPO_END) { + us->step.use_memfile_step = true; + } return true; } |