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-10 15:52:00 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-07-10 15:52:00 +0300
commit87b974caa1e2b780c8031d67a42488039036c489 (patch)
tree6776b8d35f25b2c458f90e0ba4cfa497782ebc30 /source/blender/blenkernel/intern/lattice.c
parentae2033aca2047afbfe0bf449bcd01b5b79a124b8 (diff)
Cleanup/Refactor: pass Main pointer to all ID copy functions.
Also allows us to get rid of a few _copy_ex() versions...
Diffstat (limited to 'source/blender/blenkernel/intern/lattice.c')
-rw-r--r--source/blender/blenkernel/intern/lattice.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c
index e85fad55532..88b0418938f 100644
--- a/source/blender/blenkernel/intern/lattice.c
+++ b/source/blender/blenkernel/intern/lattice.c
@@ -277,15 +277,15 @@ Lattice *BKE_lattice_add(Main *bmain, const char *name)
return lt;
}
-Lattice *BKE_lattice_copy_ex(Main *bmain, Lattice *lt)
+Lattice *BKE_lattice_copy(Main *bmain, Lattice *lt)
{
Lattice *ltn;
- ltn = BKE_libblock_copy_ex(bmain, &lt->id);
+ ltn = BKE_libblock_copy(bmain, &lt->id);
ltn->def = MEM_dupallocN(lt->def);
if (lt->key) {
- ltn->key = BKE_key_copy_ex(bmain, ltn->key);
+ ltn->key = BKE_key_copy(bmain, ltn->key);
ltn->key->from = (ID *)ltn;
}
@@ -304,11 +304,6 @@ Lattice *BKE_lattice_copy_ex(Main *bmain, Lattice *lt)
return ltn;
}
-Lattice *BKE_lattice_copy(Lattice *lt)
-{
- return BKE_lattice_copy_ex(G.main, lt);
-}
-
/** Free (or release) any data used by this lattice (does not free the lattice itself). */
void BKE_lattice_free(Lattice *lt)
{
@@ -358,7 +353,7 @@ void BKE_lattice_make_local(Main *bmain, Lattice *lt)
/* No extern_local_lattice... */
}
else {
- Lattice *lt_new = BKE_lattice_copy_ex(bmain, lt);
+ Lattice *lt_new = BKE_lattice_copy(bmain, lt);
lt_new->id.us = 0;