Search - User list
Full Version: Weird hou.NodeConnection behaviour
Root » Technical Discussion » Weird hou.NodeConnection behaviour
dagush
Dear all,

I've been playing in Python with the node connections in Houdini, and I've found something that I've I think is… strange. It's an EXTREMELY minor issue, but…
Take the following code (from hou.Node.outputConnections explanation)

>>> box = hou.node(“/obj”).createNode(“geo”).createNode(“box”)
>>> box.parent().createNode(“xform”).setFirstInput(box)
>>> box.parent().createNode(“subdivide”).setFirstInput(box)
>>> box.outputConnections()

it shows

(<hou.NodeConnection from box1 output 0 to xform1 input 0>, <hou.NodeConnection from box1 outp
ut 0 to subdivide1 input 0>)

Which is what I expected. But, if I ask the connections about its input or output nodes, it shows

>>> box.outputConnections().outputNode()
<hou.SopNode of type subdivide at /obj/geo1/subdivide1>
>>> box.outputConnections().inputNode()
<hou.SopNode of type box at /obj/geo1/box1>

shouldn't it be the other way round? I mean, for consistency with the whole system… Specially if you consider what the help says “A connection goes from an output node into an input node.”

thanks for the time!!!!

dagush.-
graham
The help is kind of vague.

I think of it in terms of a connection representing the wire itself. The outputNode() is the node at the end of the wire and the inputNode() is at the start of the wire.

Of course when using the input/output indices, the inputIndex() is the input index connection on the output node. The outputIndex() is the output index on the input node.

So it is slightly confusing but that's just they way it's always been.
dagush
ah!
OK, thanks for the quick answer!!!

cheers

dagush.-
PS I wish you all a happy new year! -)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB