NodeSocket(bpy_struct)

base class — bpy_struct

subclasses — NodeSocketStandard

class bpy.types.NodeSocket(bpy_struct)

Input or output socket of a node

bl_idname
Type :string, default “”, (never None)
enabled

Enable the socket

Type :boolean, default False
hide

Hide the socket

Type :boolean, default False
identifier

Unique identifier for mapping sockets

Type :string, default “”, (readonly, never None)
in_out

Input or Output type

Type :enum in [‘IN’, ‘OUT’], default ‘IN’, (readonly)
is_linked

True if the socket is connected

Type :boolean, default False, (readonly)
name

Socket name

Type :string, default “”, (never None)
node

Node owning this socket

Type :Node, (readonly)
show_expanded

Socket links are expanded in the user interface

Type :boolean, default False
type

Data type

Type :enum in [‘CUSTOM’, ‘VALUE’, ‘INT’, ‘BOOLEAN’, ‘VECTOR’, ‘STRING’, ‘RGBA’, ‘SHADER’], default ‘VALUE’

List of node links from or to this socket (readonly)

draw(context, layout, node)

Draw socket

Parameters:
  • layout (UILayout, (never None)) – Layout, Layout in the UI
  • node (Node, (never None)) – Node, Node the socket belongs to
draw_color(context, node)

Color of the socket icon

Parameters:node (Node, (never None)) – Node, Node the socket belongs to
Returns:Color
Return type:float array of 4 items in [0, 1]

Inherited Properties

Inherited Functions

References

Previous topic

NodeReroute(Node)

Next topic

NodeSocketBool(NodeSocketStandard)