diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-11 20:13:42 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-11 22:30:02 +0300 |
commit | 2ec17e655c4fdabc6251b5c81f4404451160923c (patch) | |
tree | e733b30bb19cfc0037ffae8a01bac3c57334ebac /source/blender/blenkernel/intern/armature.c | |
parent | 439ccca1e0b7078f3055ec14a7c81e964594ae6b (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/armature.c')
-rw-r--r-- | source/blender/blenkernel/intern/armature.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index 2473dbee2a3..3850e4b5bf0 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -162,6 +162,7 @@ void BKE_armature_make_local(Main *bmain, bArmature *arm) if (is_local) { if (!is_lib) { id_clear_lib_data(bmain, &arm->id); + BKE_id_expand_local(&arm->id, false); } else { bArmature *arm_new = BKE_armature_copy(bmain, arm); @@ -221,6 +222,8 @@ bArmature *BKE_armature_copy(Main *bmain, bArmature *arm) newArm->act_edbone = NULL; newArm->sketch = NULL; + BKE_id_expand_local(&newArm->id, true); + if (ID_IS_LINKED_DATABLOCK(arm)) { BKE_id_lib_local_paths(bmain, arm->id.lib, &newArm->id); } |