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:
Diffstat (limited to 'source/blender/blenkernel/intern/lattice.c')
-rw-r--r--source/blender/blenkernel/intern/lattice.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c
index 88b0418938f..7ffec1e70d9 100644
--- a/source/blender/blenkernel/intern/lattice.c
+++ b/source/blender/blenkernel/intern/lattice.c
@@ -286,6 +286,7 @@ Lattice *BKE_lattice_copy(Main *bmain, Lattice *lt)
if (lt->key) {
ltn->key = BKE_key_copy(bmain, ltn->key);
+ ltn->key->id.us = 0; /* Will be increased again by BKE_id_expand_local. */
ltn->key->from = (ID *)ltn;
}
@@ -297,6 +298,8 @@ Lattice *BKE_lattice_copy(Main *bmain, Lattice *lt)
ltn->editlatt = NULL;
+ BKE_id_expand_local(&ltn->id, true);
+
if (ID_IS_LINKED_DATABLOCK(lt)) {
BKE_id_lib_local_paths(bmain, lt->id.lib, &ltn->id);
}
@@ -350,7 +353,7 @@ void BKE_lattice_make_local(Main *bmain, Lattice *lt)
if (lt->key) {
BKE_key_make_local(bmain, lt->key);
}
- /* No extern_local_lattice... */
+ BKE_id_expand_local(&lt->id, false);
}
else {
Lattice *lt_new = BKE_lattice_copy(bmain, lt);