diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-11 21:56:28 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-11 22:30:02 +0300 |
commit | 5b2bc1d713f52f2486f5dc4ff46c4796c44fe265 (patch) | |
tree | a4b36c67dfe79d779653085ef14f224131ae5815 /source/blender | |
parent | 3c8f22a528b2a2236b8f05ecd69a62e721704944 (diff) |
Use new generic BKE_id_expand_local() for make_local() for object.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 1a01cc2da62..ae09d8c8fff 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1186,21 +1186,6 @@ Object *BKE_object_copy(Main *bmain, Object *ob) return BKE_object_copy_ex(bmain, ob, false); } -static int extern_local_object_callback( - void *UNUSED(user_data), struct ID *UNUSED(id_self), struct ID **id_pointer, int cd_flag) -{ - /* We only tag usercounted ID usages as extern... Why? */ - if ((cd_flag & IDWALK_USER) && *id_pointer) { - id_lib_extern(*id_pointer); - } - return IDWALK_RET_NOP; -} - -static void extern_local_object(Object *ob) -{ - BKE_library_foreach_ID_link(&ob->id, extern_local_object_callback, NULL, 0); -} - void BKE_object_make_local(Main *bmain, Object *ob) { bool is_local = false, is_lib = false; @@ -1219,7 +1204,7 @@ void BKE_object_make_local(Main *bmain, Object *ob) if (is_local) { if (!is_lib) { id_clear_lib_data(bmain, &ob->id); - extern_local_object(ob); + BKE_id_expand_local(&ob->id, false); } else { Object *ob_new = BKE_object_copy(bmain, ob); |