davylew Posted June 13, 2009 Share Posted June 13, 2009 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? Quote Link to comment Share on other sites More sharing options...
symek Posted June 13, 2009 Share Posted June 13, 2009 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. Quote Link to comment Share on other sites More sharing options...
edward Posted June 13, 2009 Share Posted June 13, 2009 hou.pwd.geometry() is the OUTPUT geometry. Initially, it is copied from the first input's geometry. Quote Link to comment Share on other sites More sharing options...
davylew Posted June 15, 2009 Author Share Posted June 15, 2009 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. Quote Link to comment Share on other sites More sharing options...
edward Posted June 15, 2009 Share Posted June 15, 2009 I think that is done by setting your minimum inputs to 0 and maximum inputs to 9999. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.