[Bf-blender-cvs] [7367c0bde46] master: Fix assert weight painting after undo
Campbell Barton
noreply at git.blender.org
Mon Oct 29 05:22:45 CET 2018
Commit: 7367c0bde4636e2b87d5e795556b9ce162f8eb7e
Author: Campbell Barton
Date: Mon Oct 29 15:21:25 2018 +1100
Branches: master
https://developer.blender.org/rB7367c0bde4636e2b87d5e795556b9ce162f8eb7e
Fix assert weight painting after 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 08a45f367f4..9478c2e0351 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5683,7 +5683,13 @@ static void direct_link_object(FileData *fd, Object *ob)
CLAMP(ob->rotmode, ROT_MODE_MIN, ROT_MODE_MAX);
if (ob->sculpt) {
- ob->sculpt = MEM_callocN(sizeof(SculptSession), "reload sculpt session");
+ 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);
More information about the Bf-blender-cvs
mailing list