diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-12-12 16:58:10 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-12-12 16:58:10 +0300 |
commit | b708dce34f8caa52efba7ddf7ed00582a36e38f9 (patch) | |
tree | d1ad9398b143a8e01e5748d07480634facbf8c31 /source/blender/blenkernel/intern/library.c | |
parent | efadc8051eaca1202d5f7074b8a644b26eb54e75 (diff) |
Cleanup: Rename BKE_libblock_relink, and move it to BKE_library_remap.h
Was a waaaaayyyyy to much generic name for such a specific func, renamed
to much more descriptive BKE_libblock_relink_to_newid().
In near future (few weeks, to limit as much as possible silent mismatch
in branches), will rename BKE_libblock_relink_ex to BKE_libblock_relink,
this is the real generic data-block relinking func!
Diffstat (limited to 'source/blender/blenkernel/intern/library.c')
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 31c10c843da..65f37d0a5b1 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -1173,31 +1173,6 @@ void *BKE_libblock_copy_nolib(ID *id, const bool do_action) return idn; } -static int id_relink_looper(void *UNUSED(user_data), ID *UNUSED(self_id), ID **id_pointer, const int cd_flag) -{ - ID *id = *id_pointer; - if (id) { - /* See: NEW_ID macro */ - if (id->newid) { - BKE_library_update_ID_link_user(id->newid, id, cd_flag); - *id_pointer = id->newid; - } - else if (id->tag & LIB_TAG_NEW) { - id->tag &= ~LIB_TAG_NEW; - BKE_libblock_relink(id); - } - } - return IDWALK_RET_NOP; -} - -void BKE_libblock_relink(ID *id) -{ - if (ID_IS_LINKED_DATABLOCK(id)) - return; - - BKE_library_foreach_ID_link(id, id_relink_looper, NULL, 0); -} - void BKE_library_free(Library *lib) { if (lib->packedfile) |