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:
authorCampbell Barton <ideasman42@gmail.com>2019-01-09 01:06:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-01-09 01:12:57 +0300
commit1b6b0fbd957f70ea177dbfd431ec2a2ba2d0daa6 (patch)
tree50237ad044991a8ba6d4f0faf7c75b06f2cf6885 /source/blender/blenloader
parent583c32133473d5e33367f5ff623f4dfabd5b2f15 (diff)
Fix T60044: Sculpting brush is not visible
Same logic as fix from D4153, but only applied when running undo.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 316a98c46c4..bc3d38fd7f4 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5646,7 +5646,8 @@ static void direct_link_object(FileData *fd, Object *ob)
CLAMP(ob->rotmode, ROT_MODE_MIN, ROT_MODE_MAX);
if (ob->sculpt) {
- if (ob->mode & OB_MODE_ALL_SCULPT) {
+ /* Only create data on undo, otherwise rely on editor mode switching. */
+ if (fd->memfile && (ob->mode & OB_MODE_ALL_SCULPT)) {
ob->sculpt = MEM_callocN(sizeof(SculptSession), "reload sculpt session");
ob->sculpt->mode_type = ob->mode;
}