diff options
author | Bastien Montagne <bastien@blender.org> | 2020-07-23 18:02:30 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-07-23 18:15:32 +0300 |
commit | 706b690ec60daac01195fd6bc30db5565303bb7e (patch) | |
tree | 6ddf9e08d87a6d75c3bbeaaa7fd19bb1b1f99a1f /source | |
parent | 8d35dceb14612322a0b70b36b94a2b63893a72af (diff) |
Fix (unreported) bad handling of pointers in overrides with shapekeys.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/lib_override.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/lib_override.c b/source/blender/blenkernel/intern/lib_override.c index 421a53b8e8d..707498d0d6f 100644 --- a/source/blender/blenkernel/intern/lib_override.c +++ b/source/blender/blenkernel/intern/lib_override.c @@ -1453,6 +1453,11 @@ void BKE_lib_override_library_update(Main *bmain, ID *local) /* This is some kind of hard-coded 'always enforced override'... */ BKE_lib_id_swap(bmain, &local_key->id, &tmp_key->id); tmp_key->id.flag |= (local_key->id.flag & LIB_EMBEDDED_DATA_LIB_OVERRIDE); + /* The swap of local and tmp_id inverted those pointers, we need to redefine proper relationships. */ + *BKE_key_from_id_p(local) = local_key; + *BKE_key_from_id_p(tmp_id) = tmp_key; + local_key->from = local; + tmp_key->from = tmp_id; } /* Again, horribly inn-efficient in our case, we need something off-Main |