diff options
author | Bastien Montagne <bastien@blender.org> | 2020-09-14 15:55:48 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-09-14 15:59:29 +0300 |
commit | ec6d32b238da507c258a4b571e332c5cb67a6b18 (patch) | |
tree | c877d2f1ea898d40572084573bd391b02ec87dcc /source/blender/blenloader/intern/readfile.c | |
parent | 4b14f763da0e207bb561a40aefc5473ff0c5b184 (diff) |
Fix T78392: [2.83.5, 2.90, 2.91] Crash on undo/ redo after changing modes.
During undo/redo read code is expected to clear the `OB_MODE_EDIT`
bitflag of `Object.mode`, for some reasons.
This was not done anymore for re-used Objects, we need to add a special
handling case for that too.
Should be backported to 2.90 and 2.83 (will probably not be straight
forward for the latter).
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index b0f0a08651c..38dc63af1fe 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -6553,6 +6553,9 @@ static void read_libblock_undo_restore_identical( if (ob->proxy != NULL) { ob->proxy->proxy_from = ob; } + /* For undo we stay in object mode during undo presses, so keep editmode disabled for re-used + * data-blocks too. */ + ob->mode &= ~OB_MODE_EDIT; } } |