From 3a53ae8d4bd3b18bdf0a9468742518584f8f49c1 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 17 Feb 2020 15:47:24 +0100 Subject: Fix T73817: Shape key users not properly mapped when duplicating their obdata. Once again those crappy weirdos IDs with their crappy weirdos 'loopback' pointers... This is a quick hack for now, think id_copy needs to be reworked a bit to supported re-entrant sub-ID copying (also an issue with nodes I bet). --- source/blender/blenkernel/intern/lattice.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/blenkernel/intern/lattice.c') diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c index ebfffc8279d..02cf7f1cd45 100644 --- a/source/blender/blenkernel/intern/lattice.c +++ b/source/blender/blenkernel/intern/lattice.c @@ -282,6 +282,8 @@ void BKE_lattice_copy_data(Main *bmain, Lattice *lt_dst, const Lattice *lt_src, if (lt_src->key && (flag & LIB_ID_COPY_SHAPEKEY)) { BKE_id_copy_ex(bmain, <_src->key->id, (ID **)<_dst->key, flag); + /* XXX This is not nice, we need to make BKE_id_copy_ex fully re-entrant... */ + lt_dst->key->from = <_dst->id; } if (lt_src->dvert) { -- cgit v1.2.3