NodeTreeInterface(bpy_struct)#

base class — bpy_struct

class bpy.types.NodeTreeInterface(bpy_struct)#

Declaration of sockets and ui panels of a node group

active#

Active item

Type:

NodeTreeInterfaceItem

active_index#

Index of the active item

Type:

int in [0, inf], default 0

items_tree#

Items in the node interface

Type:

bpy_prop_collection of NodeTreeInterfaceItem, (readonly)

new_socket(name, description='', in_out='INPUT', socket_type='DEFAULT', parent=None)#

Add a new socket to the interface

Parameters:
  • name (string, (never None)) – Name, Name of the socket

  • description (string, (optional, never None)) – Description, Description of the socket

  • in_out (enum in ['INPUT', 'OUTPUT'], (optional)) –

    Input/Output Type, Create an input or output socket

    • INPUT Input – Generate a input node socket.

    • OUTPUT Output – Generate a output node socket.

  • socket_type (enum in ['DEFAULT'], (optional)) – Socket Type, Type of socket generated on nodes

  • parent (NodeTreeInterfacePanel, (optional)) – Parent, Panel to add the socket in

Returns:

Socket, New socket

Return type:

NodeTreeInterfaceSocket

new_panel(name, description='', default_closed=False)#

Add a new panel to the interface

Parameters:
  • name (string, (never None)) – Name, Name of the new panel

  • description (string, (optional, never None)) – Description, Description of the panel

  • default_closed (boolean, (optional)) – Default Closed, Panel is closed by default on new nodes

Returns:

Panel, New panel

Return type:

NodeTreeInterfacePanel

copy(item)#

Add a copy of an item to the interface

Parameters:

item (NodeTreeInterfaceItem, (never None)) – Item, Item to copy

Returns:

Item Copy, Copy of the item

Return type:

NodeTreeInterfaceItem

remove(item, move_content_to_parent=True)#

Remove an item from the interface

Parameters:
  • item (NodeTreeInterfaceItem, (never None)) – Item, The item to remove

  • move_content_to_parent (boolean, (optional)) – Move Content, If the item is a panel, move the contents to the parent instead of deleting it

clear()#

Remove all items from the interface

move(item, to_position)#

Move an item to another position

Parameters:
  • item (NodeTreeInterfaceItem, (never None)) – Item, The item to move

  • to_position (int in [0, inf]) – To Position, Target position for the item in its current panel

move_to_parent(item, parent, to_position)#

Move an item to a new panel and/or position.

Parameters:
  • item (NodeTreeInterfaceItem, (never None)) – Item, The item to move

  • parent (NodeTreeInterfacePanel) – Parent, New parent of the item

  • to_position (int in [0, inf]) – To Position, Target position for the item in the new parent panel

classmethod bl_rna_get_subclass(id, default=None)#
Parameters:

id (string) – The RNA type identifier.

Returns:

The RNA type or default when not found.

Return type:

bpy.types.Struct subclass

classmethod bl_rna_get_subclass_py(id, default=None)#
Parameters:

id (string) – The RNA type identifier.

Returns:

The class or default when not found.

Return type:

type

Inherited Properties#

Inherited Functions#

References#