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

   201   2   1
User Avatar
Member
1168 posts
Joined: April 2017
Offline
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 - Nov. 4, 2025 16:22:00
User Avatar
Member
126 posts
Joined: Dec. 2019
Offline
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)

Obeida ZAKZAK
Houdini Pipeline Supervisor
TAT Studio
User Avatar
Member
1168 posts
Joined: April 2017
Offline
Oh! Perfect! That will do.

Thanks!
  • Quick Links