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...
This commit is contained in:
Bastien Montagne 2019-01-30 20:32:28 +01:00
parent f4b1f1f0be
commit b21bd431e3
Notes: blender-bot 2024-04-29 13:07:32 +02:00
Referenced by issue #60378, All armatures reset positions on linked collection when ctrl+z used on anything. Blender 2.80. Problem for production files!
1 changed files with 5 additions and 2 deletions

View File

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