From b21bd431e3a50c79d9db549254141fe7ffa311a7 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 30 Jan 2019 20:32:28 +0100 Subject: Fix T60378: All armatures reset positions on linked collection when ctrl+z used on anything. Issue actually exists since ages, probably 2.7x update system forced all armature proxies to be fully refreshed after an undo? In any case, proxy_from should only be reset for 'local' proxies (i.e. directly linked datablocks), not for linked proxies... --- source/blender/blenloader/intern/readfile.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 42f3c35034e..aaa7ea6da8c 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -1573,14 +1573,17 @@ static void change_idid_adr(ListBase *mainlist, FileData *basefd, void *old, voi /* lib linked proxy objects point to our local data, we need * to clear that pointer before reading the undo memfile since * the object might be removed, it is set again in reading - * if the local object still exists */ + * if the local object still exists. + * This is only valid for local proxy objects though, linked ones should not be affected here. + */ void blo_clear_proxy_pointers_from_lib(Main *oldmain) { Object *ob = oldmain->object.first; for (; ob; ob = ob->id.next) { - if (ob->id.lib) + if (ob->id.lib != NULL && ob->proxy_from != NULL && ob->proxy_from->id.lib == NULL) { ob->proxy_from = NULL; + } } } -- cgit v1.2.3