From e0763760e4307cf5fdd16a9d860573709b2d9a18 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 24 Nov 2021 10:32:28 +0100 Subject: 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. --- source/blender/blenkernel/intern/object.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/blender/blenkernel/intern/object.cc') diff --git a/source/blender/blenkernel/intern/object.cc b/source/blender/blenkernel/intern/object.cc index b2dd4b40bae..c12be9cc80c 100644 --- a/source/blender/blenkernel/intern/object.cc +++ b/source/blender/blenkernel/intern/object.cc @@ -1258,6 +1258,7 @@ IDTypeInfo IDType_ID_OB = { /* name_plural */ "objects", /* translation_context */ BLT_I18NCONTEXT_ID_OBJECT, /* flags */ 0, + /* asset_type_info */ &AssetType_OB, /* init_data */ object_init_data, /* copy_data */ object_copy_data, @@ -1275,8 +1276,6 @@ IDTypeInfo IDType_ID_OB = { /* blend_read_undo_preserve */ nullptr, /* lib_override_apply_post */ object_lib_override_apply_post, - - /* asset_type_info */ &AssetType_OB, }; void BKE_object_workob_clear(Object *workob) -- cgit v1.2.3