Commit: 6ddd280b21025cdce981f64cabae35348804b95c Author: Wannes Malfait Date: Tue Mar 30 10:15:23 2021 -0500 Branches: master https://developer.blender.org/rB6ddd280b21025cdce981f64cabae35348804b95c
Nodes: Expose multi input socket in python API It was not possible to determine if a socket was multi input previously with BPY. This patch exposes the flag as a read-only property of a node socket. This is important for addons which automatically add connections between nodes. Differential Revision: https://developer.blender.org/D10847 =================================================================== M source/blender/makesrna/intern/rna_nodetree.c =================================================================== diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 32b75243537..277cfada44d 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -9697,6 +9697,12 @@ static void rna_def_node_socket(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Linked", "True if the socket is connected"); + prop = RNA_def_property(srna, "is_multi_input", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", SOCK_MULTI_INPUT); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text( + prop, "Multi Input", "True if the socket can accept multiple ordered input links"); + prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE); RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SOCK_COLLAPSED); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs