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-09 15:44:48 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-07-09 16:44:12 +0300
commit9044ccec5f811fd380fc0348d91d1c53729eea22 (patch)
treeca49364eae2fba58bbc043ae9a72866e0f926588 /source/blender/blenkernel/intern/curve.c
parent8bb7a339f76549b4820a670450c0799713d650f8 (diff)
Cleanup to shapekeys' make_local (and copy) functions.
Mostly pass bmain and do not check for NULL key, keys' make_local is suspiciously simple in fact, but think until those behave like real full-featured IDs, it's doing enough!
Diffstat (limited to 'source/blender/blenkernel/intern/curve.c')
-rw-r--r--source/blender/blenkernel/intern/curve.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 485099427e9..61c4b1b3368 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -191,8 +191,10 @@ Curve *BKE_curve_copy(Curve *cu)
cun->tb = MEM_dupallocN(cu->tb);
cun->bb = MEM_dupallocN(cu->bb);
- cun->key = BKE_key_copy(cu->key);
- if (cun->key) cun->key->from = (ID *)cun;
+ if (cu->key) {
+ cun->key = BKE_key_copy(cu->key);
+ cun->key->from = (ID *)cun;
+ }
cun->editnurb = NULL;
cun->editfont = NULL;
@@ -242,7 +244,9 @@ void BKE_curve_make_local(Curve *cu)
if (cu->id.us == 1) {
id_clear_lib_data(bmain, &cu->id);
- BKE_key_make_local(cu->key);
+ if (cu->key) {
+ BKE_key_make_local(bmain, cu->key);
+ }
extern_local_curve(cu);
return;
}
@@ -256,7 +260,9 @@ void BKE_curve_make_local(Curve *cu)
if (is_local && is_lib == false) {
id_clear_lib_data(bmain, &cu->id);
- BKE_key_make_local(cu->key);
+ if (cu->key) {
+ BKE_key_make_local(bamin, cu->key);
+ }
extern_local_curve(cu);
}
else if (is_local && is_lib) {