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-11 20:13:42 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-07-11 22:30:02 +0300
commit2ec17e655c4fdabc6251b5c81f4404451160923c (patch)
treee733b30bb19cfc0037ffae8a01bac3c57334ebac /source/blender/blenkernel/intern/lattice.c
parent439ccca1e0b7078f3055ec14a7c81e964594ae6b (diff)
Use new generic BKE_id_expand_local() for both make_local() and copy() functions of obdata
(armature, mesh, curve, mball, lattice, lamp, camera, and speaker). This greatly simplifies said code, once again no change expected from user PoV.
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);