From a5c59fb90ef9c3e330556703c86e720740cf2c8d Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Mon, 15 Nov 2021 08:07:11 +0100 Subject: 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 --- source/blender/makesrna/intern/rna_nodetree.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/makesrna') 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; -- cgit v1.2.3