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