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:
authorLukas Tönne <lukas.toenne@gmail.com>2022-05-01 11:27:22 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2022-05-01 11:27:22 +0300
commitdf0616bcd0c3d2a020a36c573b4df49c9947c949 (patch)
treebb0ce40b3fa6c836518e495e4dcdeda32d30252d /source/blender/makesrna/intern/rna_nodetree.c
parent171851a6c87469f27d7f4766fbb62c54c5d05e7d (diff)
Nodes: Fix T90233
- Fix default_value initialization of custom node tree interface: This was crashing when adding a custom interface socket to a tree. The node_socket_set_typeinfo function was called too early, creating a default float socket, which then doesn't match the socket type after changing to the custom type. The node_socket_set_typeinfo only allocates and initializes default_value when it isn't already set. That is because the function is used either when creating new sockets or to initialize typeinfo after loading files. So default_value has to be either null or has to be matching the current type already. - Fix RNA flag for string return value of the valid_socket_type callback: String return values of registerable RNA functions need a PROP_THICK_WRAP flag since they don't have a fixed buffer to write into.
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 4d68330c84d..eaf2142495e 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -12441,7 +12441,7 @@ static void rna_def_nodetree(BlenderRNA *brna)
RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_REGISTER_OPTIONAL);
parm = RNA_def_string(
func, "idname", "NodeSocket", MAX_NAME, "Socket Type", "Identifier of the socket type");
- RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED);
+ RNA_def_parameter_flags(parm, PROP_NEVER_NULL | PROP_THICK_WRAP, PARM_REQUIRED);
RNA_def_function_return(func, RNA_def_boolean(func, "valid", false, "", ""));
}