From 95847f6ac7ce074501d0f7f2b874ef4036601dc4 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 9 Jan 2015 09:52:51 +0100 Subject: Fix T43159: Copying of linked datablocks using relpath leads to invalid paths in new copies. Propper fix reverting most of rB60e70c0c6014e5, which was only partial specific fix. This code uses generic `BKE_id_lib_local_paths()` func to handle all possible paths. Reviewers: sergey, campbellbarton Differential Revision: https://developer.blender.org/D977 --- source/blender/blenkernel/intern/group.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/blenkernel/intern/group.c') diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c index 6ea6bafaa14..1f9cf2e11b7 100644 --- a/source/blender/blenkernel/intern/group.c +++ b/source/blender/blenkernel/intern/group.c @@ -149,6 +149,10 @@ Group *BKE_group_copy(Group *group) groupn = BKE_libblock_copy(&group->id); BLI_duplicatelist(&groupn->gobject, &group->gobject); + if (group->id.lib) { + BKE_id_lib_local_paths(G.main, group->id.lib, &groupn->id); + } + return groupn; } -- cgit v1.2.3