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>2016-07-14 14:03:22 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-07-14 19:33:12 +0300
commitf87603662d03bf908094ed7a7f002a07bf13be38 (patch)
tree0c16ff1a26bd3ceffd4a9cbf7044c77b19797f24 /source/blender/blenkernel/intern/lattice.c
parentf2509e764e3be417c6a400e56be75dce9b6acde5 (diff)
Add option to id_make_local to force localization of datablock, even if not used locally.
Will be used by link/append code.
Diffstat (limited to 'source/blender/blenkernel/intern/lattice.c')
-rw-r--r--source/blender/blenkernel/intern/lattice.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c
index 67f49266efc..9d4f14110a2 100644
--- a/source/blender/blenkernel/intern/lattice.c
+++ b/source/blender/blenkernel/intern/lattice.c
@@ -330,11 +330,11 @@ void BKE_lattice_free(Lattice *lt)
}
-void BKE_lattice_make_local(Main *bmain, Lattice *lt)
+void BKE_lattice_make_local(Main *bmain, Lattice *lt, const bool force_local)
{
bool is_local = false, is_lib = false;
- /* - only lib users: do nothing
+ /* - only lib users: do nothing (unless force_local is set)
* - only local users: set flag
* - mixed: make copy
*/
@@ -345,11 +345,11 @@ void BKE_lattice_make_local(Main *bmain, Lattice *lt)
BKE_library_ID_test_usages(bmain, lt, &is_local, &is_lib);
- if (is_local) {
+ if (force_local || is_local) {
if (!is_lib) {
id_clear_lib_data(bmain, &lt->id);
if (lt->key) {
- BKE_key_make_local(bmain, lt->key);
+ BKE_key_make_local(bmain, lt->key, force_local);
}
BKE_id_expand_local(&lt->id);
}