[Bf-blender-cvs] [1b6b0fbd957] master: Fix T60044: Sculpting brush is not visible

Campbell Barton noreply at git.blender.org
Tue Jan 8 23:34:52 CET 2019


Commit: 1b6b0fbd957f70ea177dbfd431ec2a2ba2d0daa6
Author: Campbell Barton
Date:   Wed Jan 9 09:06:59 2019 +1100
Branches: master
https://developer.blender.org/rB1b6b0fbd957f70ea177dbfd431ec2a2ba2d0daa6

Fix T60044: Sculpting brush is not visible

Same logic as fix from D4153, but only applied when running undo.

===================================================================

M	source/blender/blenloader/intern/readfile.c

===================================================================

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;
 		}



More information about the Bf-blender-cvs mailing list