Revert "Fix T60044: Sculpting brush is not visible on file load"

This reverts commit 4d8ed937f2.

An alternative fix will come soon as a patch, since this introduced an issue.
Rolling back since the original fix (sculpt cursor on load) is less important
than the issue it introduced (crash on weight paint undo/redo).

Fix T60322.
This commit is contained in:
Dalai Felinto
2019-01-08 18:31:36 -02:00
parent 12e9d52882
commit 583c321334

View File

@@ -5645,7 +5645,15 @@ static void direct_link_object(FileData *fd, Object *ob)
/* in case this value changes in future, clamp else we get undefined behavior */
CLAMP(ob->rotmode, ROT_MODE_MIN, ROT_MODE_MAX);
ob->sculpt = NULL;
if (ob->sculpt) {
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);
ob->currentlod = ob->lodlevels.first;