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/brush.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/blenkernel/intern/brush.c') diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 7c1915ea225..55d347a4fb2 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -178,6 +178,10 @@ Brush *BKE_brush_copy(Brush *brush) brushn->id.us++; } + if (brush->id.lib) { + BKE_id_lib_local_paths(G.main, brush->id.lib, &brushn->id); + } + return brushn; } -- cgit v1.2.3