marcosimonvfx Posted November 27, 2020 Share Posted November 27, 2020 Hi Hopefully this is a quick one: How does one get the function input() to work on any kind of node. In the documentation I see it on almost every node, and yet if I try to use it in a python node I always get an error "<nodeType> object has no attribute input". Simple setup for trying: In obj, create a geo and connecta pythonscript node to it with hou.pwd().input(0). pythonscript is of the type ObjNode and the documentation says this function input() does exist (https://www.sidefx.com/docs/houdini/hom/hou/ObjNode.html) and yet I get an error : / obj.inputs() works, but I need the node (or None) of a specific input number, that's why this node would make all my problems go away. Quote Link to comment Share on other sites More sharing options...
marcosimonvfx Posted November 27, 2020 Author Share Posted November 27, 2020 (edited) Ah - green color means new in 18.5 ... that explains a lot! : D PS: outside of updating then, is there now way (in 18.0) to get the input number or name of a node connected to another node? Say a node has four inputs and only one of them is connected (the second). node.inputs() gets you all the nodes connected, but it doesn't tell you which input they are connected to. With node.input(n) and a for loop you could cycle through, but input() apparently doesn't exist in 18.0. Any other ideas? Edited November 27, 2020 by marcosimonvfx 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.