Fix #113013: Make in_out socket property read-only and remove the button #113048

Merged
Lukas Tönne merged 1 commits from LukasTonne/blender:remove-socket-inout-enum into blender-v4.0-release 2023-09-29 10:30:07 +02:00
2 changed files with 1 additions and 4 deletions

View File

@ -937,7 +937,6 @@ class NODE_PT_node_tree_interface(Panel):
if active_item.item_type == 'SOCKET':
layout.prop(active_item, "socket_type", text="Type")
layout.prop(active_item, "description")
layout.prop(active_item, "in_out", text="Input/Output")
# Display descriptions only for Geometry Nodes, since it's only used in the modifier panel.
if tree.type == 'GEOMETRY':
field_socket_types = {

View File

@ -892,10 +892,8 @@ static void rna_def_node_interface_socket(BlenderRNA *brna)
prop = RNA_def_property(srna, "in_out", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, nullptr, "flag");
RNA_def_property_enum_items(prop, node_tree_interface_socket_in_out_items);
RNA_def_property_enum_default(prop, NODE_INTERFACE_SOCKET_INPUT);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Input/Output Type", "Input or output socket type");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_NodeTreeInterfaceItem_update");
prop = RNA_def_property(srna, "hide_value", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, nullptr, "flag", NODE_INTERFACE_SOCKET_HIDE_VALUE);