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-03-24 17:07:58 +0300
committerBastien Montagne <bastien@blender.org>2021-03-24 17:11:54 +0300
commit8bbd6ba8b738309ed49160691797e1bb2bdd3321 (patch)
tree4abf2c5ea504fd5b52fae9864662a7664b136309 /source/blender/makesdna/DNA_ID.h
parentc1f5a56e32f2cac5dbb0a5b1515d809db1e01205 (diff)
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.
Diffstat (limited to 'source/blender/makesdna/DNA_ID.h')
-rw-r--r--source/blender/makesdna/DNA_ID.h40
1 files changed, 39 insertions, 1 deletions
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,
};