Avoid assert w/ recent sculpt changes on undo

This commit is contained in:
Campbell Barton
2019-01-09 13:25:23 +11:00
parent 4069b10be8
commit a4d21441f9

View File

@@ -5646,13 +5646,11 @@ static void direct_link_object(FileData *fd, Object *ob)
CLAMP(ob->rotmode, ROT_MODE_MIN, ROT_MODE_MAX);
if (ob->sculpt) {
ob->sculpt = NULL;
/* Only create data on undo, otherwise rely on editor mode switching. */
if (fd->memfile && (ob->mode & OB_MODE_ALL_SCULPT)) {
BKE_object_sculpt_data_create(ob);
}
else {
ob->sculpt = NULL;
}
}
link_list(fd, &ob->lodlevels);