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:
- active_index
Index of the active item (in [0, inf], default 0)
- Type:
int
- items_tree
Items in the node interface (default None, readonly)
- new_socket(name, *, description='', in_out='INPUT', socket_type='DEFAULT', parent=None)
Add a new socket to the interface
- Parameters:
name (str) – Name, Name of the socket (never None)
description (str) – Description, Description of the socket (optional, never None)
in_out (Literal['INPUT', 'OUTPUT']) –
Input/Output Type, Create an input or output socket (optional)
INPUTInput – Generate a input node socket.OUTPUTOutput – Generate a output node socket.
socket_type (Literal['DEFAULT']) – Socket Type, Type of socket generated on nodes (optional)
parent (
NodeTreeInterfacePanel) – Parent, Panel to add the socket in (optional)
- Returns:
Socket, New socket
- Return type:
- new_panel(name, *, description='', default_closed=False)
Add a new panel to the interface
- Parameters:
name (str) – Name, Name of the new panel (never None)
description (str) – Description, Description of the panel (optional, never None)
default_closed (bool) – Default Closed, Panel is closed by default on new nodes (optional)
- Returns:
Panel, New panel
- Return type:
- copy(item)
Add a copy of an item to the interface
- Parameters:
item (
NodeTreeInterfaceItem) – Item, Item to copy (never None)- Returns:
Item Copy, Copy of the item
- Return type:
- remove(item, *, move_content_to_parent=True)
Remove an item from the interface
- Parameters:
item (
NodeTreeInterfaceItem) – Item, The item to remove (never None)move_content_to_parent (bool) – Move Content, If the item is a panel, move the contents to the parent instead of deleting it (optional)
- clear()
Remove all items from the interface
- move(item, to_position)
Move an item to another position
- Parameters:
item (
NodeTreeInterfaceItem) – Item, The item to move (never None)to_position (int) – To Position, Target position for the item in its current panel (in [0, inf])
- move_to_parent(item, parent, to_position)
Move an item to a new panel and/or position.
- Parameters:
item (
NodeTreeInterfaceItem) – Item, The item to move (never None)parent (
NodeTreeInterfacePanel) – Parent, New parent of the itemto_position (int) – To Position, Target position for the item in the new parent panel (in [0, inf])
- classmethod bl_rna_get_subclass(id, default=None, /)
- Parameters:
id (str) – The RNA type identifier.
default (
bpy.types.Struct| None) – The value to return when not found.
- Returns:
The RNA type or default when not found.
- Return type:
- classmethod bl_rna_get_subclass_py(id, default=None, /)
- Parameters:
id (str) – The RNA type identifier.
default (type | None) – The value to return when not found.
- Returns:
The class or default when not found.
- Return type:
type