[Bf-blender-cvs] [583c3213347] master: Revert "Fix T60044: Sculpting brush is not visible on file load"
Dalai Felinto
noreply at git.blender.org
Tue Jan 8 21:33:24 CET 2019
Commit: 583c32133473d5e33367f5ff623f4dfabd5b2f15
Author: Dalai Felinto
Date: Tue Jan 8 18:31:36 2019 -0200
Branches: master
https://developer.blender.org/rB583c32133473d5e33367f5ff623f4dfabd5b2f15
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.
===================================================================
M source/blender/blenloader/intern/readfile.c
===================================================================
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;
More information about the Bf-blender-cvs
mailing list