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/curve.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/curve.c')
-rw-r--r--source/blender/blenkernel/intern/curve.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 4dc0f1ccf8c..3a7be948760 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -174,12 +174,12 @@ Curve *BKE_curve_add(Main *bmain, const char *name, int type)
return cu;
}
-Curve *BKE_curve_copy_ex(Main *bmain, Curve *cu)
+Curve *BKE_curve_copy(Main *bmain, Curve *cu)
{
Curve *cun;
int a;
- cun = BKE_libblock_copy_ex(bmain, &cu->id);
+ cun = BKE_libblock_copy(bmain, &cu->id);
BLI_listbase_clear(&cun->nurb);
BKE_nurbList_duplicate(&(cun->nurb), &(cu->nurb));
@@ -195,7 +195,7 @@ Curve *BKE_curve_copy_ex(Main *bmain, Curve *cu)
cun->bb = MEM_dupallocN(cu->bb);
if (cu->key) {
- cun->key = BKE_key_copy_ex(bmain, cu->key);
+ cun->key = BKE_key_copy(bmain, cu->key);
cun->key->from = (ID *)cun;
}
@@ -219,11 +219,6 @@ Curve *BKE_curve_copy_ex(Main *bmain, Curve *cu)
return cun;
}
-Curve *BKE_curve_copy(Curve *cu)
-{
- return BKE_curve_copy_ex(G.main, cu);
-}
-
static int extern_local_curve_callback(
void *UNUSED(user_data), struct ID *UNUSED(id_self), struct ID **id_pointer, int cd_flag)
{
@@ -263,7 +258,7 @@ void BKE_curve_make_local(Main *bmain, Curve *cu)
extern_local_curve(cu);
}
else {
- Curve *cu_new = BKE_curve_copy_ex(bmain, cu);
+ Curve *cu_new = BKE_curve_copy(bmain, cu);
cu_new->id.us = 0;