A socket is the point where 2 nodes can be linked. Therefor sockets are the main interface between a node and the user. You might think having many different socket types is unnecessary but it has very important advantages.
- It can help finding which sockets make sense to connect; Although this is not always the case because some sockets change there type automatically when they are linked.
- The clearer a socket is defined the better the performance of a node because it doesn’t have to check the input type which adds a lot of overhead. That is also the main reason why Python is slower than many compiled languages.
Currently there are 36 different socket types, but this may change over time.
To see which sockets you have installed go to the addon directory and take a look
sockets folder. All files except
represent one socket.
Many sockets come in pairs. E.g. there is an
Object and an
Object List socket.
List sockets are by default just an empty python list (not a tuple!).
To get the
bl_idname of a list socket take the base id name and insert
Sockets that have a corresponding list data type are often called
All Data Types¶
|Data Type||bl_idname||Has List||Function or the data it carries|
||No||List with four floats:
||Yes||Tuple containing two integers|
||Yes||Normal python float value|
||No||Can contain anything; Take care when converting to another type|
||Yes||Normal python integer value|
||No||Class that contains vertex locations and edge/polygon indices|
||No||Contains no data; the function depends on the node where it is used|
||Yes||Object (can be a mesh, lamp, camera, ...) or
||No||Object Group or
||Yes||Particle object or
||Yes||Particle System object or
||Yes||Contains vertices, area, center, normal and material index|
||Yes||Tuple containing at least 3 integers|
||Yes||Either a poly or bezier spline object|
||Yes||Normal python text|
||Yes||Contains a location, normal and vertex group weights|