From 4d18fa268cf3f8db7e448c7408738b2bd497250b Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 24 Mar 2021 10:46:38 +0100 Subject: Tweak default ID types processing order, step 01: Collections. Move `OB_GR` processing just after scenes, and before objects. This is much more sensible in general, and fixes glitches in auto-resync process of library overrides in particular. --- source/blender/makesdna/DNA_ID.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 077f9bf8bdc..76676c0ebc1 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -787,7 +787,6 @@ enum { INDEX_ID_CA, INDEX_ID_TXT, INDEX_ID_SO, - INDEX_ID_GR, INDEX_ID_PC, INDEX_ID_BR, INDEX_ID_PA, @@ -798,6 +797,7 @@ enum { INDEX_ID_SCR, INDEX_ID_OB, INDEX_ID_LS, + INDEX_ID_GR, INDEX_ID_SCE, INDEX_ID_WS, INDEX_ID_WM, -- cgit v1.2.3 From 39bf5e5022a643a7e46182d3157cc940dbd21e55 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 24 Mar 2021 10:54:05 +0100 Subject: Tweak default ID types processing order, step 02: Simulations. This is a fairly low-level ID type, so it needs to be higher in the list, for now put it just before the shading-related types. --- source/blender/makesdna/DNA_ID.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 76676c0ebc1..258913f8e3e 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -773,6 +773,7 @@ enum { INDEX_ID_IM, INDEX_ID_TE, INDEX_ID_MA, + INDEX_ID_SIM, INDEX_ID_VF, INDEX_ID_AR, INDEX_ID_CF, @@ -801,10 +802,7 @@ enum { INDEX_ID_SCE, INDEX_ID_WS, INDEX_ID_WM, - /* TODO: This should probably be tweaked, #Mask and #Simulation are rather low-level types that - * should most likely be defined //before// #Object and geometry type indices? */ INDEX_ID_MSK, - INDEX_ID_SIM, INDEX_ID_NULL, INDEX_ID_MAX, }; -- cgit v1.2.3 From 950f0b8b97b0a40e87258743b578d0cc02c9f67f Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 24 Mar 2021 10:56:00 +0100 Subject: Tweak default ID types processing order, step 03: Mask. Move it with the rest of the image/shading related types. --- source/blender/makesdna/DNA_ID.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 258913f8e3e..9c5dafb2902 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -770,6 +770,7 @@ enum { INDEX_ID_PAL, INDEX_ID_GD, INDEX_ID_NT, + INDEX_ID_MSK, INDEX_ID_IM, INDEX_ID_TE, INDEX_ID_MA, @@ -802,7 +803,6 @@ enum { INDEX_ID_SCE, INDEX_ID_WS, INDEX_ID_WM, - INDEX_ID_MSK, INDEX_ID_NULL, INDEX_ID_MAX, }; -- cgit v1.2.3 From e96c286e53ad63c6e81ed7d681ee438a74a49444 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 24 Mar 2021 10:57:04 +0100 Subject: Tweak default ID types processing order, step 04: Screen. Move Screen data type higher in the list, just after the other UI-related types, and before Scenes. --- source/blender/makesdna/DNA_ID.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 9c5dafb2902..c5fcb85f644 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -796,11 +796,11 @@ enum { INDEX_ID_LP, INDEX_ID_WO, INDEX_ID_MC, - INDEX_ID_SCR, INDEX_ID_OB, INDEX_ID_LS, INDEX_ID_GR, INDEX_ID_SCE, + INDEX_ID_SCR, INDEX_ID_WS, INDEX_ID_WM, INDEX_ID_NULL, -- cgit v1.2.3 From c0f5f9ad6e3b3dcace39ba0891064a76f0790985 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 24 Mar 2021 11:01:52 +0100 Subject: Tweak default ID types processing order, step 05: PaintCurve. Move PaintCurve type with other weird, not-really-data ID types (like Palette and Brushes), higher in the process. Those preset-like types may use a lot of other ID types, but should only be used by UI-related (and Scene, for tool settings) types. --- source/blender/makesdna/DNA_ID.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index c5fcb85f644..c233985fc0e 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -789,7 +789,6 @@ enum { INDEX_ID_CA, INDEX_ID_TXT, INDEX_ID_SO, - INDEX_ID_PC, INDEX_ID_BR, INDEX_ID_PA, INDEX_ID_SPK, @@ -799,6 +798,7 @@ enum { INDEX_ID_OB, INDEX_ID_LS, INDEX_ID_GR, + INDEX_ID_PC, INDEX_ID_SCE, INDEX_ID_SCR, INDEX_ID_WS, -- cgit v1.2.3 From 72fa0d48ea3dd531ec17aacb2052d59f3feaa4d5 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 24 Mar 2021 12:50:03 +0100 Subject: Tweak default ID types processing order, step 06: Brushes. Move Brushes type with other weird, not-really-data ID types (like Palette and Brushes), higher in the process. Those preset-like types may use a lot of other ID types, but should only be used by UI-related (and Scene, for tool settings) types. --- source/blender/makesdna/DNA_ID.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index c233985fc0e..05a8e9a0b30 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -789,7 +789,6 @@ enum { INDEX_ID_CA, INDEX_ID_TXT, INDEX_ID_SO, - INDEX_ID_BR, INDEX_ID_PA, INDEX_ID_SPK, INDEX_ID_LP, @@ -799,6 +798,7 @@ enum { INDEX_ID_LS, INDEX_ID_GR, INDEX_ID_PC, + INDEX_ID_BR, INDEX_ID_SCE, INDEX_ID_SCR, INDEX_ID_WS, -- cgit v1.2.3 From a35d145b72c7f9afc916507fc32bf631710e7286 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 24 Mar 2021 11:22:56 +0100 Subject: Tweak default ID types processing order, step 07: MovieClips. Move them with the other shading/image types, just before Images. --- source/blender/makesdna/DNA_ID.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 05a8e9a0b30..9326f034dc6 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -772,6 +772,7 @@ enum { INDEX_ID_NT, INDEX_ID_MSK, INDEX_ID_IM, + INDEX_ID_MC, INDEX_ID_TE, INDEX_ID_MA, INDEX_ID_SIM, @@ -793,7 +794,6 @@ enum { INDEX_ID_SPK, INDEX_ID_LP, INDEX_ID_WO, - INDEX_ID_MC, INDEX_ID_OB, INDEX_ID_LS, INDEX_ID_GR, -- cgit v1.2.3 From be073d8baf409b2f20e5fe10eeb908b09a701cb7 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 24 Mar 2021 11:24:16 +0100 Subject: Tweak default ID types processing order, step 08: CacheFiles. Move them with the rest of the simulation types. --- source/blender/makesdna/DNA_ID.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 9326f034dc6..db77592c441 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -775,10 +775,10 @@ enum { INDEX_ID_MC, INDEX_ID_TE, INDEX_ID_MA, + INDEX_ID_CF, INDEX_ID_SIM, INDEX_ID_VF, INDEX_ID_AR, - INDEX_ID_CF, INDEX_ID_ME, INDEX_ID_CU, INDEX_ID_MB, -- cgit v1.2.3 From 0e6088f4672b51abdef997779197bc727a6886d1 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 24 Mar 2021 11:28:03 +0100 Subject: Tweak default ID types processing order, step 09: Particles. Move Particles next to the other physics/simulation types, after obdata types. --- source/blender/makesdna/DNA_ID.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index db77592c441..7d4b1ab2d17 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -777,6 +777,7 @@ enum { INDEX_ID_MA, INDEX_ID_CF, INDEX_ID_SIM, + INDEX_ID_PA, INDEX_ID_VF, INDEX_ID_AR, INDEX_ID_ME, @@ -790,7 +791,6 @@ enum { INDEX_ID_CA, INDEX_ID_TXT, INDEX_ID_SO, - INDEX_ID_PA, INDEX_ID_SPK, INDEX_ID_LP, INDEX_ID_WO, -- cgit v1.2.3 From ae84a1363d1a7ad6b2251b8ac2d1f240af8d894b Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 24 Mar 2021 11:29:31 +0100 Subject: Tweak default ID types processing order, step 10: LineStyles. Move LineStyles (Freestyle) type with the rest of the shading types. --- source/blender/makesdna/DNA_ID.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 7d4b1ab2d17..d1751c0948f 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -775,6 +775,7 @@ enum { INDEX_ID_MC, INDEX_ID_TE, INDEX_ID_MA, + INDEX_ID_LS, INDEX_ID_CF, INDEX_ID_SIM, INDEX_ID_PA, @@ -795,7 +796,6 @@ enum { INDEX_ID_LP, INDEX_ID_WO, INDEX_ID_OB, - INDEX_ID_LS, INDEX_ID_GR, INDEX_ID_PC, INDEX_ID_BR, -- cgit v1.2.3 From f3fe3d965ffef91728b36821c41cc8773d44c49f Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 24 Mar 2021 11:31:00 +0100 Subject: Tweak default ID types processing order, step 11: Worlds. Move World type with the other shading types. --- source/blender/makesdna/DNA_ID.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index d1751c0948f..dddcafe5f8f 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -776,6 +776,7 @@ enum { INDEX_ID_TE, INDEX_ID_MA, INDEX_ID_LS, + INDEX_ID_WO, INDEX_ID_CF, INDEX_ID_SIM, INDEX_ID_PA, @@ -794,7 +795,6 @@ enum { INDEX_ID_SO, INDEX_ID_SPK, INDEX_ID_LP, - INDEX_ID_WO, INDEX_ID_OB, INDEX_ID_GR, INDEX_ID_PC, -- cgit v1.2.3 From fe55ede5ce25180cb06285bda55d3c119eda1a88 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 24 Mar 2021 11:35:26 +0100 Subject: Tweak default ID types processing order, step 12: Sounds. Move Sound type toward the end of the list, this is a file-wrapper type with typically no dependency to any other ID. --- source/blender/makesdna/DNA_ID.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index dddcafe5f8f..4c447045d8a 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -770,6 +770,7 @@ enum { INDEX_ID_PAL, INDEX_ID_GD, INDEX_ID_NT, + INDEX_ID_SO, INDEX_ID_MSK, INDEX_ID_IM, INDEX_ID_MC, @@ -792,7 +793,6 @@ enum { INDEX_ID_LA, INDEX_ID_CA, INDEX_ID_TXT, - INDEX_ID_SO, INDEX_ID_SPK, INDEX_ID_LP, INDEX_ID_OB, -- cgit v1.2.3 From 55683fafc5d5b7323fbcfe392e1f24f773a788a7 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 24 Mar 2021 11:38:22 +0100 Subject: Tweak default ID types processing order, step 13: Texts. Move Texts type toward the end of the list, this is a file-wrapper type with typically no dependency to any other ID. --- source/blender/makesdna/DNA_ID.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 4c447045d8a..599ddf6af7c 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -770,6 +770,7 @@ enum { INDEX_ID_PAL, INDEX_ID_GD, INDEX_ID_NT, + INDEX_ID_TXT, INDEX_ID_SO, INDEX_ID_MSK, INDEX_ID_IM, @@ -792,7 +793,6 @@ enum { INDEX_ID_LT, INDEX_ID_LA, INDEX_ID_CA, - INDEX_ID_TXT, INDEX_ID_SPK, INDEX_ID_LP, INDEX_ID_OB, -- cgit v1.2.3 From 7db4ef98fe467fa1b2b0814fdb1d0369d92bdacd Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 24 Mar 2021 11:39:45 +0100 Subject: Tweak default ID types processing order, step 14: Fonts. Move Font type toward the end of the list, this is a file-wrapper type with typically no dependency to any other ID. --- source/blender/makesdna/DNA_ID.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 599ddf6af7c..aa81f7e2b54 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -770,6 +770,7 @@ enum { INDEX_ID_PAL, INDEX_ID_GD, INDEX_ID_NT, + INDEX_ID_VF, INDEX_ID_TXT, INDEX_ID_SO, INDEX_ID_MSK, @@ -782,7 +783,6 @@ enum { INDEX_ID_CF, INDEX_ID_SIM, INDEX_ID_PA, - INDEX_ID_VF, INDEX_ID_AR, INDEX_ID_ME, INDEX_ID_CU, -- cgit v1.2.3 From fd75a4cbd83a0fccea019e0cb53eee5a21d0073e Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 24 Mar 2021 11:41:37 +0100 Subject: Tweak default ID types processing order, step 15: ShapeKeys. Move shape keys type just after all obdata types, since they are some sort of sub-geometry data. --- source/blender/makesdna/DNA_ID.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index aa81f7e2b54..8f4718b56cd 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -766,7 +766,6 @@ enum { INDEX_ID_LI = 0, INDEX_ID_IP, INDEX_ID_AC, - INDEX_ID_KE, INDEX_ID_PAL, INDEX_ID_GD, INDEX_ID_NT, @@ -783,6 +782,7 @@ enum { INDEX_ID_CF, INDEX_ID_SIM, INDEX_ID_PA, + INDEX_ID_KE, INDEX_ID_AR, INDEX_ID_ME, INDEX_ID_CU, -- cgit v1.2.3 From c1f5a56e32f2cac5dbb0a5b1515d809db1e01205 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 24 Mar 2021 12:52:51 +0100 Subject: Tweak default ID types processing order, step 16: Palettes. Move Palettes type with other weird, not-really-data ID types (like PaintCurves and Brushes), higher in the process. Those preset-like types may use a lot of other ID types, but should only be used by UI-related (and Scene, for tool settings) types. --- source/blender/makesdna/DNA_ID.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 8f4718b56cd..f30a241439a 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -766,7 +766,6 @@ enum { INDEX_ID_LI = 0, INDEX_ID_IP, INDEX_ID_AC, - INDEX_ID_PAL, INDEX_ID_GD, INDEX_ID_NT, INDEX_ID_VF, @@ -797,6 +796,7 @@ enum { INDEX_ID_LP, INDEX_ID_OB, INDEX_ID_GR, + INDEX_ID_PAL, INDEX_ID_PC, INDEX_ID_BR, INDEX_ID_SCE, -- cgit v1.2.3 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') 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 From dda02a448a38a5f5f4b0df1738bec3b158ce739f Mon Sep 17 00:00:00 2001 From: Victor-Louis De Gusseme Date: Thu, 25 Mar 2021 23:29:33 -0400 Subject: Geometry Nodes: Add Attribute Map Range Node This commit adds a node with a "Map Range" operation for attributes just like the non-attribute version of the node. However, unlike the regular version of the node, it also supports operations on vectors. Differential Revision: https://developer.blender.org/D10344 --- source/blender/makesdna/DNA_node_types.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index f24d0e40d19..7abf4883c60 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -1119,6 +1119,14 @@ typedef struct NodeAttributeCompare { char _pad[5]; } NodeAttributeCompare; +typedef struct NodeAttributeMapRange { + /* GeometryNodeAttributeDataType */ + uint8_t data_type; + + /* NodeMapRangeType. */ + uint8_t interpolation_type; +} NodeAttributeMapRange; + typedef struct NodeAttributeMath { /* NodeMathOperation. */ uint8_t operation; -- cgit v1.2.3 From 43455f385709ede032de0c39792bad422be87a92 Mon Sep 17 00:00:00 2001 From: Charlie Jolly Date: Fri, 26 Mar 2021 09:28:15 +0000 Subject: Geometry Nodes: Add Attribute Clamp Node This adds a Clamp node for Geometry Nodes Attributes. Supports both Min-Max and Range clamp modes. Float, Vector, Color and Int data types supported. Reviewed By: HooglyBoogly, simonthommes Differential Revision: https://developer.blender.org/D10526 --- source/blender/makesdna/DNA_node_types.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 7abf4883c60..1b7d1aaee9d 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -1108,6 +1108,14 @@ typedef struct NodeDenoise { char hdr; } NodeDenoise; +typedef struct NodeAttributeClamp { + /* CustomDataType. */ + uint8_t data_type; + + /* NodeClampOperation. */ + uint8_t operation; +} NodeAttributeClamp; + typedef struct NodeAttributeCompare { /* FloatCompareOperation. */ uint8_t operation; -- cgit v1.2.3 From ee367084a7ee499d99f32b4343b4e7905f6afa5c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 27 Mar 2021 14:48:26 +1100 Subject: Comment: note that structs are zeroed instead of using defaults --- source/blender/makesdna/intern/dna_genfile.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index 3690a1126d4..d199638710d 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -1194,7 +1194,10 @@ static void reconstruct_struct(const DNA_ReconstructInfo *reconstruct_info, new_block + step->data.substruct.new_offset); break; case RECONSTRUCT_STEP_INIT_ZERO: - /* Do nothing, because the memory block has been calloced. */ + /* Do nothing, because the memory block are zeroed (from #MEM_callocN). + * + * Note that the struct could be initialized with the default struct, + * however this complicates versioning, especially with flags, see: D4500. */ break; } } -- cgit v1.2.3 From 805d9478109e76ca221f202ff152bae685f77ff4 Mon Sep 17 00:00:00 2001 From: Habib Gahbiche Date: Mon, 29 Mar 2021 07:44:27 +0200 Subject: Compositor: Add Anti-Aliasing node This is an implementation of Enhanced Subpixel Morphological Antialiasing (SMAA) The algorithm was proposed by: Jorge Jimenez, Jose I. Echevarria, Tiago Sousa, Diego Gutierrez This node provides only SMAA 1x mode, so the operation will be done with no spatial multisampling nor temporal supersampling. See Patch for comparisons. The existing AA operation seems to be used only for binary images by some other nodes. Using SMAA for binary images needs no important parameter such as "threshold", so we perhaps can switch the operation to SMAA, though that changes existing behavior. Notes: 1. The program code assumes the screen coordinates are DirectX style that the vertical direction is upside-down, so "top" and "bottom" actually represent bottom and top, respectively. Thanks for Habib Gahbiche (zazizizou) to polish and finalize this patch. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D2411 --- source/blender/makesdna/DNA_node_types.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 1b7d1aaee9d..7b4788737f8 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -715,6 +715,12 @@ typedef struct NodeBilateralBlurData { char _pad[2]; } NodeBilateralBlurData; +typedef struct NodeAntiAliasingData { + float threshold; + float contrast_limit; + float corner_rounding; +} NodeAntiAliasingData; + /* NOTE: Only for do-version code. */ typedef struct NodeHueSat { float hue, sat, val; -- cgit v1.2.3 From 87f9405c9aedb4b23c3400780db42ddda0cc4c2b Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Mon, 29 Mar 2021 09:53:12 +0200 Subject: Overrides: API to create an override template. This is functionality that isn't accessible via the user interface. The API allows the creation and modification of an override template that holds rules that needs to be checked when overriding the asset. The API is setup that it cannot be changed after creation. Later on when the system is more mature we will allow changing overrides operations. NOTE: This is an experimental feature and should not be used in productions. Reviewed By: mont29, sebbas Differential Revision: https://developer.blender.org/D10792 --- source/blender/makesdna/DNA_userdef_types.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 4595b12e9d4..334669d3433 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -646,7 +646,8 @@ typedef struct UserDef_Experimental { char use_switch_object_operator; char use_sculpt_tools_tilt; char use_asset_browser; - char _pad[6]; + char use_override_templates; + char _pad[5]; /** `makesdna` does not allow empty structs. */ } UserDef_Experimental; -- cgit v1.2.3 From fd10c21f51243921e645939e3f6a569c19864d8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 29 Mar 2021 18:22:42 +0200 Subject: Cleanup: animation, remove `BONE_UNKEYED` flag Remove the `BONE_UNKEYED` flag. It was only written (set/cleared) but never actually read. Also remove `framechange_poses_clear_unkeyed()` as its only function was to clear the `BONE_UNKEYED` flag. It wasn't used anywhere either. The only code that used the flag was the `extract_pose_from_action()`, which was removed in 2869ce6cfab3aa4ff471bef6e49ac6fe15426247 (2009). No functional changes. --- source/blender/makesdna/DNA_armature_types.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index 09304ce09f2..411fde13bb2 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -230,8 +230,10 @@ typedef enum eBone_Flag { BONE_MULT_VG_ENV = (1 << 11), /** bone doesn't deform geometry */ BONE_NO_DEFORM = (1 << 12), +#ifdef DNA_DEPRECATED_ALLOW /** set to prevent destruction of its unkeyframed pose (after transform) */ BONE_UNKEYED = (1 << 13), +#endif /** set to prevent hinge child bones from influencing the transform center */ BONE_HINGE_CHILD_TRANSFORM = (1 << 14), #ifdef DNA_DEPRECATED_ALLOW -- cgit v1.2.3 From 74d5a93b2bf7806993d9baa24fd35228e52c4970 Mon Sep 17 00:00:00 2001 From: Scott Wilson Date: Tue, 30 Mar 2021 11:16:45 +0200 Subject: Armature: Add Display Axis Offset Display the bone axes at the head (root) of the bone by default, instead of the tail (tip), and add a slider so that it's possible to adjust this position. Versioning code is in place to ensure existing files behave the same (axes shown at tail), whereas new Armatures will be using the new default (axes shown at head). Reviewed By: #animation_rigging, #user_interface, Severin, Sybren Differential Revision: https://developer.blender.org/D7685 --- source/blender/makesdna/DNA_armature_types.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index 411fde13bb2..85780bc33c5 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -134,7 +134,7 @@ typedef struct bArmature { /** ID data is older than edit-mode data (TODO: move to edit-mode struct). */ char needs_flush_to_id; - char _pad0[7]; + char _pad0[3]; int flag; int drawtype; @@ -146,6 +146,9 @@ typedef struct bArmature { unsigned int layer_used; /** For buttons to work, both variables in this order together. */ unsigned int layer, layer_protected; + + /** Relative position of the axes on the bone, from head (0.0f) to tail (1.0f). */ + float axes_position; } bArmature; /* armature->flag */ -- cgit v1.2.3 From 142541124976af41f08fb5479886350c2d803710 Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Tue, 30 Mar 2021 16:23:58 -0300 Subject: Cleanup/Refactor: Unify functions that redraw the depth buffer Now `ED_view3d_backbuf_depth_validate`, `ED_view3d_draw_depth` and `ED_view3d_draw_depth_gpencil` are unified in `ED_view3d_depth_override`. This new function replaces `ED_view3d_autodist_init`. Also, since `ED_view3d_depth_update` depends on the render context, and changing the context is a slow operation, that function also was removed, and the depth buffer cached is now updated inside the new unified drawing function when the "bool update_cache" parameter is true. Finally `V3D_INVALID_BACKBUF` flag has been renamed and moved to `runtime.flag`. Differential revision: https://developer.blender.org/D10678 --- source/blender/makesdna/DNA_view3d_types.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index b8e2256c3c6..2f4e4e57b9f 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -367,7 +367,7 @@ typedef struct View3D { #define V3D_LOCAL_COLLECTIONS (1 << 0) #define V3D_FLAG_UNUSED_1 (1 << 1) /* cleared */ #define V3D_HIDE_HELPLINES (1 << 2) -#define V3D_INVALID_BACKBUF (1 << 3) +#define V3D_FLAG_UNUSED_2 (1 << 3) /* cleared */ #define V3D_XR_SESSION_MIRROR (1 << 4) #define V3D_FLAG_UNUSED_10 (1 << 10) /* cleared */ @@ -380,6 +380,8 @@ typedef struct View3D { enum { /** The 3D view which the XR session was created in is flagged with this. */ V3D_RUNTIME_XR_SESSION_ROOT = (1 << 0), + /** Some operators override the depth buffer for dedicated occlusion operations. */ + V3D_RUNTIME_DEPTHBUF_OVERRIDDEN = (1 << 1), }; /** #RegionView3D.persp */ -- cgit v1.2.3 From 910469eccf9e973988ed21c4935d8b58d70fa307 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Wed, 31 Mar 2021 11:37:09 -0500 Subject: Cleanup: Remove remaining unused code for DispList "bevel_split" This was added in rB93aeb6b318a7, last changed in rB8f0a44a5d55d, and removed in rB51b796ff1528. I assume it was a way for curves to have split edges at corners. As far as I can tell it only ever worked in Blender Internal, and that has been gone for years. Another possible route here would be restoring this functionality, but it's generally preferrable to reduce complexity in this area of curve code than adding it back, especially in the context of other improvements planned related to curves in geometry nodes. Differential Revision: https://developer.blender.org/D9966 --- source/blender/makesdna/DNA_curve_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index 4f914089347..ff2e7fc500a 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -72,7 +72,7 @@ typedef struct BevPoint { float sina, cosa; /** 3D Only. */ float dir[3], tan[3], quat[4]; - short split_tag, dupe_tag; + short dupe_tag; } BevPoint; /* These two Lines with # tell makesdna this struct can be excluded. */ -- cgit v1.2.3