Reference a channel in a VEXpression ?

   4468   4   1
User Avatar
Member
253 posts
Joined: July 2006
Offline
How can we reference a channel in a VEXpression ?

Docs say: In the snippet, you can read/write the value of a parameter on the node using parameter_id.

So I created a spare float called b.

Now in a wrangle I typed:

@get_b = b_b;

It throws error. I tried a bunch of other ways too with no luck.

Any help?
User Avatar
Member
8595 posts
Joined: July 2007
Online
the referencing by purely typing name works only for existing parameters that are bound to the variables inside assets containing VEXpression field

to get the value of any spare parm you'd need to use ch() function or better corresponding expression to parm type (chf() for float parm, chv() for vector, chi() for int, etc.)

so in Wrangle it would be
f@get_b = chf(“b”);
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
253 posts
Joined: July 2006
Offline
Darn it! I could've sworn that was the first thing I tried.

Thanks !
User Avatar
Member
143 posts
Joined: Sept. 2017
Offline
Hi, in Houdini 180.308 right now. Just a quick question about referencing spare inputs:
when I type chf(“spare_input0”), everything works fine, but chf(-1) throws an error. Am I using the -1 shortcut wrong, or is this a bug?

Cheers,
Ivan
User Avatar
Member
2042 posts
Joined: Sept. 2015
Offline
It appears your not using the full syntax required for chf when using op_id.

http://www.sidefx.com/docs/houdini/vex/functions/chf.html [www.sidefx.com]

I don't know, never used that variant and whether or not it's ok to use it like you have tried.
  • Quick Links