nodes.new_socket
nodes.new_socket(tree, name, in_out='INPUT', socket_type='NodeSocketGeometry')
Create a new input or output socket on the interface of the node tree.
Parameters
| tree |
bpy.types.NodeTree |
The node tree to add the socket to. |
required |
| name |
str |
The name of the new socket. |
required |
| in_out |
Literal['INPUT', 'OUTPUT'] |
Whether the socket is an input or an output. Defaults to “INPUT”. |
'INPUT' |
| socket_type |
str |
The socket idname, e.g. “NodeSocketFloat”. Defaults to “NodeSocketGeometry”. |
'NodeSocketGeometry' |