Nodes: new operator to join Group Input nodes
This adds a new operator which can join multiple nodes together. Currently, it only supports joining Group Input nodes. However, in the future it could be extended to join e.g. Bake and Capture Attribute nodes. This uses the recently freed up ctrl+J shortcut for this functionality, which feels natural to me. The implementation is fairly straight forward. The main tricky aspect is sometimes the nodes can't be joined when that would result in two sockets being linked to each other twice. In this case, the a separate Group Input node is kept. The selected nodes are merged into the active node (in case the active node is part of the selection, otherwise there is a fallback). Pull Request: https://projects.blender.org/blender/blender/pulls/146894
This commit is contained in:
@@ -2230,6 +2230,7 @@ def km_node_editor(params):
|
||||
{"properties": [("replace", False)]}),
|
||||
("node.link_make", {"type": 'J', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("replace", True)]}),
|
||||
("node.join_nodes", {"type": 'J', "value": 'PRESS', "ctrl": True}, None),
|
||||
op_menu("NODE_MT_add", {"type": 'A', "value": 'PRESS', "shift": True}),
|
||||
op_menu("NODE_MT_swap", {"type": 'S', "value": 'PRESS', "shift": True}),
|
||||
("node.duplicate_move", {"type": 'D', "value": 'PRESS', "shift": True},
|
||||
|
||||
@@ -440,6 +440,7 @@ class NODE_MT_node(Menu):
|
||||
layout.separator()
|
||||
layout.operator("node.join", text="Join in New Frame")
|
||||
layout.operator("node.detach", text="Remove from Frame")
|
||||
layout.operator("node.join_nodes", text="Join Group Inputs")
|
||||
|
||||
layout.separator()
|
||||
props = layout.operator("wm.call_panel", text="Rename...")
|
||||
|
||||
Reference in New Issue
Block a user