python path help

   1763   0   1
User Avatar
Member
13 posts
Joined: 10月 2009
Offline
I'm just starting with python and how it interacts with houdini. I have been unable to figure out the path syntax. I have a digital asset that is named wall and inside is a switch that I need to make a menu out of the names of the inputs coming into the top of the switch. how do I direct the script to the switch node inside the digital asset?

The script is on the digital asset ‘wall’ and inside the ‘wall’ is the node named 'switch_tex". what functions would I use to get to the node and then list the inputs to the switch?

I have tried things like hou.Node.inputs(“/switch_tex”) and only seem to get errors. What am I doing wrong?


choices =

“”“hou.pwd() gets me the ‘wall’ digital asset but I need the
node inside ‘wall’ named ‘switch_tex’ but I can't figure
out how to direct the script to it”“”

for index, node in enumerate(hou.pwd().inputs()):
choices +=

return choices
  • Quick Links