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
This commit is contained in:
parent
6ea09db7a1
commit
6ddd280b21
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue