Fix T60044: Sculpting brush is not visible on file load
The original issue is that wm->paintcursors is empty until we go in and out of the sculpt mode. To fix this we need to toggle inside the sculpt mode. This is usually tackled by ED_editors_init(), however the sculpt mode toggling was never call because the object technically had "mode data". Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D4153
This commit is contained in:
parent
7bd31bdcce
commit
4d8ed937f2
Notes:
blender-bot
2023-02-14 06:00:47 +01:00
Referenced by commit 583c321334
, Revert "Fix T60044: Sculpting brush is not visible on file load"
Referenced by issue #60044, Sculpting brush is not visible
|
@ -5645,15 +5645,7 @@ 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);
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
ob->sculpt = NULL;
|
||||
|
||||
link_list(fd, &ob->lodlevels);
|
||||
ob->currentlod = ob->lodlevels.first;
|
||||
|
|
Loading…
Reference in New Issue