From 8bbd6ba8b738309ed49160691797e1bb2bdd3321 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 24 Mar 2021 15:07:58 +0100 Subject: Tweak default ID types processing order, step 17: Group and comments. Regroup ID type indices by categories, and add some comments about reasoning of current order. --- source/blender/makesdna/DNA_ID.h | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna/DNA_ID.h') diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index f30a241439a..d88db091cc2 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -763,25 +763,52 @@ typedef enum IDRecalcFlag { * See e.g. how #BKE_library_unused_linked_data_set_tag is doing this. */ enum { + /* Special case: Library, should never ever depend on any other type. */ INDEX_ID_LI = 0, - INDEX_ID_IP, + + /* Animation types, might be used by almost all other types. */ + INDEX_ID_IP, /* Deprecated. */ INDEX_ID_AC, + + /* Grease Pencil, special case, should be with the other obdata, but it can also be used by many + * other ID types, including node trees e.g. + * So there is no proper place for those, for now keep close to the lower end of the processing + * hierarchy, but we may want to re-evaluate that at some point. */ INDEX_ID_GD, + + /* Node trees, abstraction for procedural data, potentially used by many other ID types. + * + * NOTE: While node trees can also use many other ID types, they should not /own/ any of those, + * while they are being owned by many other ID types. This is why they are placed here. */ INDEX_ID_NT, + + /* File-wrapper types, those usually 'embed' external files in Blender, with no dependencies to + * other ID types. */ INDEX_ID_VF, INDEX_ID_TXT, INDEX_ID_SO, + + /* Image/movie types, can be used by shading ID types, but also directly by Objects, Scenes, etc. + */ INDEX_ID_MSK, INDEX_ID_IM, INDEX_ID_MC, + + /* Shading types. */ INDEX_ID_TE, INDEX_ID_MA, INDEX_ID_LS, INDEX_ID_WO, + + /* Simulation-related types. */ INDEX_ID_CF, INDEX_ID_SIM, INDEX_ID_PA, + + /* Shape Keys snow-flake, can be used by several obdata types. */ INDEX_ID_KE, + + /* Object data types. */ INDEX_ID_AR, INDEX_ID_ME, INDEX_ID_CU, @@ -794,15 +821,26 @@ enum { INDEX_ID_CA, INDEX_ID_SPK, INDEX_ID_LP, + + /* Collection and object types. */ INDEX_ID_OB, INDEX_ID_GR, + + /* Preset-like, not-really-data types, can use many other ID types but should never be used by + * any actual data type (besides Scene, due to tool settings). */ INDEX_ID_PAL, INDEX_ID_PC, INDEX_ID_BR, + + /* Scene, after preset-like ID types because of tool settings. */ INDEX_ID_SCE, + + /* UI-related types, should never be used by any other data type. */ INDEX_ID_SCR, INDEX_ID_WS, INDEX_ID_WM, + + /* Special values. */ INDEX_ID_NULL, INDEX_ID_MAX, }; -- cgit v1.2.3