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:
authorJeroen Bakker <jbakker>2021-11-15 10:07:11 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2021-11-23 11:07:39 +0300
commit419b4e0b00c6e4191d1fd70925040e0215dd933d (patch)
treef2dfcb0d4238d3f7a59e05b96b675a62e186cf48 /source/blender/blenkernel
parent215a6f1c10ce0b52e84153547fcc4d4073c16524 (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/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/node.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc
index bb1c3b30880..230f418ba4d 100644
--- a/source/blender/blenkernel/intern/node.cc
+++ b/source/blender/blenkernel/intern/node.cc
@@ -434,8 +434,10 @@ static void write_node_socket_default_value(BlendWriter *writer, bNodeSocket *so
case SOCK_COLLECTION:
BLO_write_struct(writer, bNodeSocketValueCollection, sock->default_value);
break;
- case __SOCK_MESH:
case SOCK_CUSTOM:
+ /* Custom node sockets where default_value is defined uses custom properties for storage. */
+ break;
+ case __SOCK_MESH:
case SOCK_SHADER:
case SOCK_GEOMETRY:
BLI_assert_unreachable();