diff options
author | Bastien Montagne <bastien@blender.org> | 2020-05-12 19:20:49 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-05-12 19:54:57 +0300 |
commit | 9996688b71678a0ea9e98027d6cc3ed4c308959d (patch) | |
tree | 858b850edf5bcb65f49d862becceb503113747d1 /source/blender/blenkernel/intern/library.c | |
parent | 70b73732fe9097b13495e75bea5bc0fb67b1bc4f (diff) |
Refactor: Move library foreach_id to new IDTypeInfo structure.
Diffstat (limited to 'source/blender/blenkernel/intern/library.c')
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index e3ed21aa536..64ffea22363 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -38,6 +38,7 @@ #include "BKE_idtype.h" #include "BKE_lib_id.h" +#include "BKE_lib_query.h" #include "BKE_library.h" #include "BKE_main.h" #include "BKE_packedFile.h" @@ -53,6 +54,12 @@ static void library_free_data(ID *id) } } +static void library_foreach_id(ID *id, LibraryForeachIDData *data) +{ + Library *lib = (Library *)id; + BKE_LIB_FOREACHID_PROCESS(data, lib->parent, IDWALK_CB_NEVER_SELF); +} + IDTypeInfo IDType_ID_LI = { .id_code = ID_LI, .id_filter = 0, @@ -67,6 +74,7 @@ IDTypeInfo IDType_ID_LI = { .copy_data = NULL, .free_data = library_free_data, .make_local = NULL, + .foreach_id = library_foreach_id, }; void BKE_library_filepath_set(Main *bmain, Library *lib, const char *filepath) |