Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2015-01-09 11:52:51 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-01-09 11:53:58 +0300
commit95847f6ac7ce074501d0f7f2b874ef4036601dc4 (patch)
tree3bbf615280a30c7fa6ceebc5d3e222b0be93810e /source/blender/blenkernel/intern/mask.c
parent1b8240f5af34310017b9f245021e31e6b02ae3ce (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.c5
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;
}