Jump to content

Any one show example for multi input python sop?


davylew

Recommended Posts

I want my python sop has 4 inputs.

geo = hou.pwd().geometry()

this code gave me one instance object of first input geometry.

How do I get object to the second input?

Hey,

assuming that in general 4-inputs operators change only first input, there is no magic here, you can get the read-only geometry from node's connectors like in any other place of Houdini:

geo2 = hou.pwd().inputs()[1].geometry()

Note that hou.Node.inputs() returns variable length tuple not empty reference, so you need a logic for that ( or smarter way doing this ;) ).

hth,

skk.

Link to comment
Share on other sites

Thx SYmek & edward !!!

Another question is how create Python sop node with mutil inputs unknow the inputs number (like merge sop node)?

I want to manage different data flow and using ADD OR MIX to process those like layer structure.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...