diff options
author | Jeroen Bakker <jbakker> | 2021-11-15 10:07:11 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-11-15 10:13:22 +0300 |
commit | a5c59fb90ef9c3e330556703c86e720740cf2c8d (patch) | |
tree | e41d8fcc1b1acd04a074e4f5a58e125504d4bf9d /source/blender/makesrna/intern/rna_nodetree.c | |
parent | 622e6f05f1b5fb1db326dca647a2cbd56ca6b573 (diff) |
Fix T89260: Eevee crashes with custom node sockets.
Cause of this issue is that Custom Node Sockets info type was
initialized as SOCK_FLOAT when registering. Areas within the core that
would ignore custom socket types by checking its type would use the
socket as being a float type.
When custom node sockets have a property called default_value blender
tries to store it as an internal default value what failed in debug
builds.
This patch will set the socket type to SOCK_CUSTOM when registering a
custom socket type and allow, but skip storage of custom default values.
In this case the default values should already be stored as custom
properies.
Reviewed By: campbellbarton, JacquesLucke
Maniphest Tasks: T89260
Differential Revision: https://developer.blender.org/D13174
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 01889a1b0a9..e6b732aabd4 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -2805,6 +2805,7 @@ static StructRNA *rna_NodeSocket_register(Main *UNUSED(bmain), /* setup dummy socket & socket type to store static properties in */ memset(&dummyst, 0, sizeof(bNodeSocketType)); + dummyst.type = SOCK_CUSTOM; memset(&dummysock, 0, sizeof(bNodeSocket)); dummysock.typeinfo = &dummyst; |