diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-01-09 11:52:51 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-01-09 11:53:58 +0300 |
commit | 95847f6ac7ce074501d0f7f2b874ef4036601dc4 (patch) | |
tree | 3bbf615280a30c7fa6ceebc5d3e222b0be93810e /source/blender/blenkernel/intern/mask.c | |
parent | 1b8240f5af34310017b9f245021e31e6b02ae3ce (diff) |
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
Diffstat (limited to 'source/blender/blenkernel/intern/mask.c')
-rw-r--r-- | source/blender/blenkernel/intern/mask.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c index b8c78ce912c..83ca6cd8d72 100644 --- a/source/blender/blenkernel/intern/mask.c +++ b/source/blender/blenkernel/intern/mask.c @@ -50,6 +50,7 @@ #include "DNA_sequence_types.h" #include "BKE_curve.h" +#include "BKE_global.h" #include "BKE_library.h" #include "BKE_main.h" #include "BKE_mask.h" @@ -855,6 +856,10 @@ Mask *BKE_mask_copy(Mask *mask) mask_new->id.us++; } + if (mask->id.lib) { + BKE_id_lib_local_paths(G.main, mask->id.lib, &mask_new->id); + } + return mask_new; } |