How to get multiple wires to auto-connect between nodes?

   1795   2   2
User Avatar
Member
80 posts
Joined: April 2019
Online
I've created several HDAs, each with 4 input and 4 output pins. The inputs and outputs are named the same but when dragging one of the HDA's over the wires, it never auto-connects the 4 wires.

I've seen some built-in nodes which will auto-connect multiple wires, but I can't get it to work with custom HDAs.

What is the secret to getting it to work?



Thanks
Edited by mrpdean - March 4, 2023 05:35:09

Attachments:
wires.gif (3.8 MB)

User Avatar
Member
9380 posts
Joined: July 2007
Offline
mrpdean
What is the secret to getting it to work?
Vellum nodes do this using node graph hooks

notice the following code in the Python module:
if hou.isUIAvailable():
    from nodegraphvellumutils import setSelectPosContextData, isPassThroughConnection, createEventHandler

def isVellumNode():
    return True

the same code is present in multiinput RBD, KineFX, Flip, ... nodes, which tells me it's not very generalized workflow, as they all use Vellum code and pretend to be "VellumNode", which also lead to a lot of issues as they always try to connect to each other even if not compatible, etc.

I believe it's limited to up to 3 inputs, but you can probably write your own modified version of nodegraphvellumutils to handle your cases
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
80 posts
Joined: April 2019
Online
Thank you very much Tomas. I will look into this.
  • Quick Links