diff options
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 3b0d946ba47..84a57e9449a 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5679,7 +5679,13 @@ static void direct_link_object(FileData *fd, Object *ob) CLAMP(ob->rotmode, ROT_MODE_MIN, ROT_MODE_MAX); if (ob->sculpt) { - ob->sculpt = MEM_callocN(sizeof(SculptSession), "reload sculpt session"); + if (ob->mode & OB_MODE_ALL_SCULPT) { + ob->sculpt = MEM_callocN(sizeof(SculptSession), "reload sculpt session"); + ob->sculpt->mode_type = ob->mode; + } + else { + ob->sculpt = NULL; + } } link_list(fd, &ob->lodlevels); |