connecting vops with hom

   2013   4   1
User Avatar
Member
85 posts
Joined: 8月 2010
Offline
Hi there lovely community

I'm wiring our ubershader and am having a bit of a snooze fest wiring uploads of inputs in vops

I have a good naming convention so should be able to script it but am a bit baffled by the
the relevant functions:

outputNames - returns a tuple of connector names
setInput - requires indices
inputnames - tuple of input names
inputindex - gives an index from a name

there is no outputindex function - doh!!

not sure how else to do a lookup by name as i need the relevant output index for the setinput function

anybody have a workaround / alternative method for this?
Sam Swift-Glasman
Art Director
Five AI
User Avatar
Member
85 posts
Joined: 5月 2011
Offline
http://www.sidefx.com/docs/houdini15.0/hom/hou/NodeConnection [sidefx.com]
— dedeks 3000 —
User Avatar
Member
85 posts
Joined: 8月 2010
Offline
hi dedks thanks for the post

I did have a look at this before - isn't this just for existing connections?

Maybe I have the wrong end of the stick
do you have any examples by any chance

I want to connect multiple outputs from a vop to multiple inputs of another vop by name rather than index

many thanks
Sam Swift-Glasman
Art Director
Five AI
User Avatar
Member
387 posts
Joined: 11月 2008
Offline
They are for connecting/disconnecting too.
You can use dictionary to map indices to names.
User Avatar
Member
85 posts
Joined: 8月 2010
Offline
hi pezetko

thanks for your reply

been having a look at this and i can't get the functionailty i want

it says in the docs:
This object is “read-only”. To create or edit connections, use methods on the node, such as hou.Node.setNamedInput, hou.Node.setInput, hou.Node.setFirstInput, hou.Node.setNextInput, hou.Node.createInputNode, and hou.Node.createOutputNode.

There are no setter functions available on this class that i can find unless i am missing something?

Just to reiterate - my issue is that I want to create connections based on names not indices. There is a helper function on the hou.Node object to convert input names to indices but not output names to indices - i require both

does anyone have any examples ?

any help would be most appreciated
Sam Swift-Glasman
Art Director
Five AI
  • Quick Links