Search - User list
Full Version: VEX: Get Path of Node Connected in Input 0? {[SOLVED]}
Root » Technical Discussion » VEX: Get Path of Node Connected in Input 0? {[SOLVED]}
olivierth
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
ObeidaZakzak
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");

olivierth
Oh! Perfect! That will do.

Thanks!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB