Node panels: Enable new node group interfaces #1

Closed
Lukas Tönne wants to merge 14 commits from node-panels-final into node-panels-rna

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Showing only changes of commit 5a19e46285 - Show all commits

View File

@ -280,8 +280,11 @@ class NODE_OT_interface_item_new(NodeInterfaceOperator, Operator):
item_type: EnumProperty(
name="Item Type",
description="Type of the item to create",
items=[('SOCKET', "Socket", ""), ('PANEL', "Panel", "")],
default='SOCKET',
items=[
('INPUT', "Input Socket", ""),
('OUTPUT', "Output Socket", ""),
('PANEL', "Panel", "")],
default='INPUT',
)
socket_type = 'NodeSocketFloat'
@ -293,8 +296,10 @@ class NODE_OT_interface_item_new(NodeInterfaceOperator, Operator):
# Remember index to move the item.
dst_index = interface.active_index + 1
if self.item_type == 'SOCKET':
item = interface.new_socket("Socket", socket_type=self.socket_type)
if self.item_type == 'INPUT':
item = interface.new_socket("Socket", socket_type=self.socket_type, is_input=True)
elif self.item_type == 'OUTPUT':
item = interface.new_socket("Socket", socket_type=self.socket_type, is_output=True)
elif self.item_type == 'PANEL':
item = interface.new_panel("Panel")
else: