Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2019-01-08 23:31:36 +0300
committerDalai Felinto <dfelinto@gmail.com>2019-01-08 23:31:36 +0300
commit583c32133473d5e33367f5ff623f4dfabd5b2f15 (patch)
treed87eb532b5ccfc6dd1d407544d371d2578b9c207 /source/blender/blenloader/intern
parent12e9d52882e32d85c3890b73aa5a21aff9c787fc (diff)
Revert "Fix T60044: Sculpting brush is not visible on file load"
This reverts commit 4d8ed937f226f4cdfa6f62fde5306b14c217e9c5. 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.
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r--source/blender/blenloader/intern/readfile.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 2817f3abac0..316a98c46c4 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -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;