[Bf-blender-cvs] [4d8ed937f22] master: Fix T60044: Sculpting brush is not visible on file load

Dalai Felinto noreply at git.blender.org
Fri Jan 4 12:55:58 CET 2019


Commit: 4d8ed937f226f4cdfa6f62fde5306b14c217e9c5
Author: Dalai Felinto
Date:   Wed Jan 2 09:34:41 2019 -0200
Branches: master
https://developer.blender.org/rB4d8ed937f226f4cdfa6f62fde5306b14c217e9c5

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

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

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

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

diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index ebd8d2bd06b..bcf480c1e9f 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -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;



More information about the Bf-blender-cvs mailing list