databpy 0.9.0
  • Home
  • Attributes
  • API
  • Changelog
  1. Nodes
  2. nodes.new_socket
  • Function reference
  • Attribute
    • named_attribute
    • store_named_attribute
    • remove_named_attribute
    • AttributeDomains
    • AttributeTypes
    • AttributeArray
  • Collections
    • create_collection
    • move_to_collection
  • Objects
    • create_object
    • create_mesh_object
    • create_curves_object
    • create_pointcloud_object
    • create_bob
    • evaluate_object
    • GeometrySet
    • BlenderObject
    • BlenderObjectAttribute
    • BlenderObjectBase
    • LinkedObjectError
  • Utilities
    • require
    • require_data
    • mesh_data
    • curves_data
    • pointcloud_data
    • volume_data
    • active_scene
    • active_object
    • centre
    • lerp
  • Nodes
    • nodes.new_tree
    • nodes.swap_tree
    • nodes.custom_string_iswitch
    • nodes.append_from_blend
    • nodes.new_socket
    • nodes.tree_interface
    • nodes.input_socket
    • nodes.output_socket
    • nodes.socket_value
    • nodes.set_socket_value
    • nodes.MaintainConnections
    • nodes.DuplicatePrevention

On this page

  • nodes.new_socket
    • Parameters
    • Returns
  1. Nodes
  2. nodes.new_socket

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

Name Type Description Default
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'

Returns

Name Type Description
bpy.types.NodeTreeInterfaceSocket The newly created socket.
nodes.append_from_blend
nodes.tree_interface