Initial step for IDTypeInfo refactor 'cleanup' project.
authorBastien Montagne <b.mont29@gmail.com>
Thu, 5 Mar 2020 09:54:00 +0000 (10:54 +0100)
committerBastien Montagne <b.mont29@gmail.com>
Thu, 5 Mar 2020 09:58:58 +0000 (10:58 +0100)
commitc328049535a4bc9453f5e93365a00759347e3a05
treea6a058f3887e81e653c93400ecd163755796bddc
parent6665ce8951b2110e5dbd7126aae3c120bb6205e5
Initial step for IDTypeInfo refactor 'cleanup' project.

Introduce new IDTypeInfo structure.

Each ID type will have its own, with some minimal basic common info,
and ID management callbacks.

This patch only does it for Object type, for demo/testing purpose.
Moving all existing IDs is a goal of next "cleanup Friday".

Note that BKE_idcode features should then be merged back into BKE_idtype -
but this will have to be done later, once all ID types have been properly
converted to the new system.

Another later TODO might be to try and add callbacks for file read/write,
and lib_query ID usages looper.

This is part of T73719.

Thanks to @brecht for initial idea, and reviewing the patch.

Differential Revision: https://developer.blender.org/D6966
source/blender/blenkernel/BKE_idtype.h [new file with mode: 0644]
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/intern/idtype.c [new file with mode: 0644]
source/blender/blenkernel/intern/lib_id.c
source/blender/blenkernel/intern/lib_id_delete.c
source/blender/blenkernel/intern/object.c
source/creator/creator.c
tests/gtests/blenloader/blendfile_loading_base_test.cc