diff options
author | Bastien Montagne <bastien@blender.org> | 2020-05-13 20:08:54 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-05-13 20:08:54 +0300 |
commit | 73f38f8db0807e12413dcb133e4139f9ffbc0dad (patch) | |
tree | 66980b380f1f1101e7754d8fa1cffc6e45a7c5e8 /source | |
parent | 9ac5413ac06d5f5213607e10de5401262e3462f2 (diff) |
Refactor: Move shapekey foreach_id to new IDTypeInfo structure.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/key.c | 8 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/lib_query.c | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index 2ca6e54b5c8..af8ab22e14b 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -51,6 +51,7 @@ #include "BKE_key.h" #include "BKE_lattice.h" #include "BKE_lib_id.h" +#include "BKE_lib_query.h" #include "BKE_main.h" #include "BKE_mesh.h" #include "BKE_scene.h" @@ -91,6 +92,12 @@ static void shapekey_free_data(ID *id) } } +static void shapekey_foreach_id(ID *id, LibraryForeachIDData *data) +{ + Key *key = (Key *)id; + BKE_LIB_FOREACHID_PROCESS_ID(data, key->from, IDWALK_CB_LOOPBACK); +} + IDTypeInfo IDType_ID_KE = { .id_code = ID_KE, .id_filter = 0, @@ -105,6 +112,7 @@ IDTypeInfo IDType_ID_KE = { .copy_data = shapekey_copy_data, .free_data = shapekey_free_data, .make_local = NULL, + .foreach_id = shapekey_foreach_id, }; #define KEY_MODE_DUMMY 0 /* use where mode isn't checked for */ diff --git a/source/blender/blenkernel/intern/lib_query.c b/source/blender/blenkernel/intern/lib_query.c index d0aebde33d6..578f59fb027 100644 --- a/source/blender/blenkernel/intern/lib_query.c +++ b/source/blender/blenkernel/intern/lib_query.c @@ -934,8 +934,7 @@ static void library_foreach_ID_link(Main *bmain, } case ID_KE: { - Key *key = (Key *)id; - CALLBACK_INVOKE_ID(key->from, IDWALK_CB_LOOPBACK); + BLI_assert(0); break; } |