diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-01-09 02:16:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-01-09 02:21:51 +0300 |
commit | b536d1b95f01de9400d77dbaf311677222063178 (patch) | |
tree | eb2dd3502c70a35b18fa08af006dc5d98930d782 /source/blender/blenloader | |
parent | 1b6b0fbd957f70ea177dbfd431ec2a2ba2d0daa6 (diff) |
Object Mode: only toggle active object mode once
- When toggling a mode that doesn't support multi editing
only do this once of the active object.
- For sculpt mode create sculpt data since this is needed
for activating other sculpt objects on reload.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index bc3d38fd7f4..c7e9b8cd4ad 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5648,8 +5648,7 @@ static void direct_link_object(FileData *fd, Object *ob) if (ob->sculpt) { /* Only create data on undo, otherwise rely on editor mode switching. */ if (fd->memfile && (ob->mode & OB_MODE_ALL_SCULPT)) { - ob->sculpt = MEM_callocN(sizeof(SculptSession), "reload sculpt session"); - ob->sculpt->mode_type = ob->mode; + BKE_object_sculpt_data_create(ob); } else { ob->sculpt = NULL; |