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>2021-11-24 12:32:28 +0300
committerBastien Montagne <bastien@blender.org>2021-11-24 12:35:47 +0300
commite0763760e4307cf5fdd16a9d860573709b2d9a18 (patch)
treea10dd33d6273441932a58ce0dfe3023195f16fe0 /source/blender/blenkernel/BKE_idtype.h
parentf8dea3fe648b9f834b6977476549911b71a899aa (diff)
Cleanup: `IDTypeInfo` new `asset_type_info` member.
Two issues addressed here: I) `asset_type_info` is sub-data, not a callback. Therefore, move it before the callbacks in the `IDTypeInfo` struct. II) More important, initialize this new attribute in *ALL* `IDTypeInfo` instances. No member of this struct should ever be left implicitely uninitilazed, ever. Aftermath of rBa84f1c02d251.
Diffstat (limited to 'source/blender/blenkernel/BKE_idtype.h')
-rw-r--r--source/blender/blenkernel/BKE_idtype.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/source/blender/blenkernel/BKE_idtype.h b/source/blender/blenkernel/BKE_idtype.h
index d33c24f2c75..05441f06eb8 100644
--- a/source/blender/blenkernel/BKE_idtype.h
+++ b/source/blender/blenkernel/BKE_idtype.h
@@ -149,11 +149,12 @@ typedef struct IDTypeInfo {
/** Generic info flags about that data-block type. */
uint32_t flags;
- /* ********** ID management callbacks ********** */
+ /**
+ * Information and callbacks for assets, based on the type of asset.
+ */
+ struct AssetTypeInfo *asset_type_info;
- /* TODO: Note about callbacks: Ideally we could also handle here `BKE_lib_query`'s behavior, as
- * well as read/write of files. However, this is a bit more involved than basic ID management
- * callbacks, so we'll check on this later. */
+ /* ********** ID management callbacks ********** */
/**
* Initialize a new, empty calloc'ed data-block. May be NULL if there is nothing to do.
@@ -228,11 +229,6 @@ typedef struct IDTypeInfo {
* \note Currently needed for some update operation on point caches.
*/
IDTypeLibOverrideApplyPost lib_override_apply_post;
-
- /**
- * Callbacks for assets, based on the type of asset.
- */
- struct AssetTypeInfo *asset_type_info;
} IDTypeInfo;
/* ********** Declaration of each IDTypeInfo. ********** */