Attribute Wrangle: Get node name from @OpInput2?

   5737   4   0
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
Hi
I have an attribute wrangle set to point.
I'm trying to figure out how to get the name of the node connected at @OpInput2.
I tried gettattribute like this:
s@theName;
getattribute(@OpInput2, @theName, “detail”, “name”, 0);

But it doesn't work. What am i doing wrong?

-b
http://www.racecar.no [www.racecar.no]
User Avatar
Member
4515 posts
Joined: Feb. 2012
Online
Create a string parameter and use the opname(opinputpath(“.”, 1)) expression.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
Thanks, Did you mean like this?:
s@debug = opname(opinputpath(“.”, 1));
If i use that in an attribute wrangle i get “Call to undefined function opname”. Does that mean it doesn't work in the wrangle context?

-b
http://www.racecar.no [www.racecar.no]
User Avatar
Staff
6205 posts
Joined: July 2005
Offline
Do:

s@debug = chs('input_opname');

Then hit the parameter creation button to the right of the VEXpression input field. In the generated parameter, put the expression

`opname(opinputpath(“.”, 1))`
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
Ah, now i get it. Of course. Thanks for all the help!

-b
http://www.racecar.no [www.racecar.no]
  • Quick Links