VEX: Get Path of Node Connected in Input 0? {[SOLVED]}

   330   2   1
User Avatar
Member
1175 posts
Joined: 4月 2017
オフライン
Hi!

Lets say I have a sphere sop connected to the input 0 of a wrangle. Is there a function that will give me the path "/obj/geo3/sphere1" or at least the name "sphere1" ?

-Olivier
Edited by olivierth - 2025年11月4日 16:22:00
User Avatar
Member
128 posts
Joined: 12月 2019
オフライン
I am not aware of a specific VEX function that does this task based on input number. If you create some spare parameters you can take advantage of Hscript in parameter expressions as it has the deticated functions you are looking for :

- Node name
opinput(".", 0)

- Node path
opinputpath(".", 0)

Now, to read this in VEX snippet, you can evaluate parameter channels :
string node_node = chs("node_name");
string node_path = chsop("node_path");

Attachments:
node_path_name.png (102.4 KB)

Houdini Pipeline Supervisor @ TAT Studio
User Avatar
Member
1175 posts
Joined: 4月 2017
オフライン
Oh! Perfect! That will do.

Thanks!
  • Quick Links