Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2020-05-12 19:11:53 +0300
committerBastien Montagne <bastien@blender.org>2020-05-12 19:54:57 +0300
commit70b73732fe9097b13495e75bea5bc0fb67b1bc4f (patch)
treec441d871cb996640fd0b2a94755698808d86d2cc /source/blender/blenkernel/intern/lattice.c
parentb1b93c2ef19528b1ab6b564c5b97e1c0f05393cb (diff)
Refactor: Move lattice foreach_id to new IDTypeInfo structure.
Diffstat (limited to 'source/blender/blenkernel/intern/lattice.c')
-rw-r--r--source/blender/blenkernel/intern/lattice.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c
index cc130559b45..e7a2421a625 100644
--- a/source/blender/blenkernel/intern/lattice.c
+++ b/source/blender/blenkernel/intern/lattice.c
@@ -52,6 +52,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_modifier.h"
#include "BKE_object.h"
@@ -121,6 +122,12 @@ static void lattice_free_data(ID *id)
}
}
+static void lattice_foreach_id(ID *id, LibraryForeachIDData *data)
+{
+ Lattice *lattice = (Lattice *)id;
+ BKE_LIB_FOREACHID_PROCESS(data, lattice->key, IDWALK_CB_USER);
+}
+
IDTypeInfo IDType_ID_LT = {
.id_code = ID_LT,
.id_filter = FILTER_ID_LT,
@@ -135,6 +142,7 @@ IDTypeInfo IDType_ID_LT = {
.copy_data = lattice_copy_data,
.free_data = lattice_free_data,
.make_local = NULL,
+ .foreach_id = lattice_foreach_id,
};
int BKE_lattice_index_from_uvw(Lattice *lt, const int u, const int v, const int w)