From da6bda64839e91dea4e6a7c144f8ae30e2d9076b Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 25 Jan 2019 17:42:43 +0100 Subject: Fix T60783: (Certain) shapekeys stopped working in 2.8. This commit adds another optional check (when `--debug-io` is set) on write .blend process, to check and ensure all shape keys have their 'from' pointer properly set to their respective user ID. This is intended to be used as debuging tool mostly (to try to detect when/why some of those pointers can become NULL). For now, it also systematically perform same checks/fixes when loading a .blend file, to fix all broken ones laying around. Later we might move that usage to a do_version instead, but for now think it's safer to always perfom it (and it's rather cheap process anyway). --- source/blender/blenloader/intern/writefile.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/blenloader/intern/writefile.c') diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 2e621ab9330..0df90571daa 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -4131,6 +4131,7 @@ bool BLO_write_file( if (G.debug & G_DEBUG_IO && mainvar->lock != NULL) { BKE_report(reports, RPT_INFO, "Checking sanity of current .blend file *BEFORE* save to disk"); BLO_main_validate_libraries(mainvar, reports); + BLO_main_validate_shapekeys(mainvar, reports); } /* open temporary file, so we preserve the original in case we crash */ -- cgit v1.2.3