Page MenuHome

Node Wrangler Lazy Connect using modal operator creates wrong connections
AbandonedPublic

Authored by Frederik Steinmetz (SpiderguyF) on Jun 8 2021, 7:10 PM.

Details

Reviewers
None
Summary

Using Alt + RMB drag to connect two nodes used to create an according mix node, linked both nodes to it and created a new link to the next node, if a link to that node already existed. Now it only connects the lower to the upper one, often even creating invalid links.

The class holding the operator is:

class NWLazyConnect(Operator, NWBase):

bl_idname = "node.nw_lazy_connect"

I noticed this still worked when called from the menu with 2 nodes selected. So as a hack/workaround on release I now call the operator used by the menu without parameters. That seems to work fine.

I have not managed to change the color of the outline and the gizmo, so it's always red, no matter if you are using 2 valid nodes, or not.

Diff Detail

Event Timeline

Frederik Steinmetz (SpiderguyF) requested review of this revision.Jun 8 2021, 7:10 PM
Frederik Steinmetz (SpiderguyF) created this revision.

The shortcuts have changed with: rBAe08d6983c05f
This is the current state of the shortcuts:

  • "Lazy Connect": ALT + RMB + DRAG -> This tries to autolink two nodes. (Shows up as red)
  • "Lazy Connect with Menu": ALT + SHIFT + RMB + DRAG -> The same as the first but shows a menu. (Shows up as blue)
  • "Lazy Mix": CTRL + SHIFT + RMB + DRAG -> Tries to merge two nodes automatically (calls nw_merge_nodes()). (Shows up as green)

You can find these shortcuts when you click on "hotkey preferences" in the addon preferences for node wrangler or in the addon itself: https://developer.blender.org/diffusion/BA/browse/master/node_wrangler.py$5212.

@Frederik Steinmetz (SpiderguyF) : sorry this has been lying around (I usually dont do review).

Is this still an issue? Since yeah, the shortcuts changed...

Silly me, no it's not. Just the possibility of occasionally creating invalid connections, but that's fine, just do it manually when it fails.

Silly me, no it's not. Just the possibility of occasionally creating invalid connections, but that's fine, just do it manually when it fails.

could still report this separately, but OK, lets abandon this Diff then