Nodes: Node Wrangler: Make Lazy Connect without menu to only consider visible sockets.
When using `Lazy Connect`, the operator currently also considers sockets that are hidden. This causes unintentional socket connections and requires to use the operator with the menus for manually picking sockets which is slower and defeats the purpose. Videos in PR. This PR fixes that by not considering the hidden sockets. Pull Request: https://projects.blender.org/blender/blender/pulls/145316
This commit is contained in:
committed by
Nika Kutsniashvili
parent
998655f4d9
commit
0056784996
@@ -33,8 +33,8 @@ def node_mid_pt(node, axis):
|
||||
|
||||
|
||||
def autolink(node1, node2, links):
|
||||
available_inputs = [inp for inp in node2.inputs if inp.enabled]
|
||||
available_outputs = [outp for outp in node1.outputs if outp.enabled]
|
||||
available_inputs = [inp for inp in node2.inputs if inp.enabled and not inp.hide]
|
||||
available_outputs = [outp for outp in node1.outputs if outp.enabled and not outp.hide]
|
||||
for outp in available_outputs:
|
||||
for inp in available_inputs:
|
||||
if not inp.is_linked and inp.name == outp.name:
|
||||
|
||||
Reference in New Issue
Block a user