vex string channel: how to use as an attribute?

   5827   6   1
User Avatar
Member
1177 posts
Joined: April 2017
Offline
Hi!

I would like to make a wrangle with the option for the user to specify what attribute he/she wants to control. I started this way:

string myattribute = chs("attribute");

How do I later use that string as an attribute?

f@attribute

??

So far, I've had to use the channel chs(“attribute”) directly every time I want to bring up that attribute. Can't I use myattribute ?

Thanks.

-Olivier
Edited by olivierth - Feb. 5, 2019 22:58:48
User Avatar
Member
9384 posts
Joined: July 2007
Offline
Just use Binding Tab to define which attribute name binds to which vex @ variable name
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
1177 posts
Joined: April 2017
Offline
Thanks for the reply.

I'm having a hard time grasping how to use bindings. I've googled a lot and checked the help file but I can't find examples on it.

-Olivier
Edited by olivierth - Feb. 6, 2019 09:51:45

Attachments:
vex_binding.jpg (121.8 KB)

User Avatar
Member
6 posts
Joined: June 2020
Offline
Following up on this, an example on how to use this would be appreciated
User Avatar
Member
5100 posts
Joined: Feb. 2012
Offline
Hi,

You can use them like this:



It's useful for HDAs where you want to allow creating groups and/or attributes with custom names in VEX.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
User Avatar
Member
33 posts
Joined: June 2020
Offline
Hey, new to houdini and learning. Does Houdini offers assets/objects, not sure what to call them but ie Modo has additional meshes to add to your design ie panels, screws, fuel engine, etc.
Where can I find this in HOudini if it exists? or do you have to create your own panels, engines etc. I see your design model contains all kinds of cool little designs/panels etc. Super cool.
Edited by plabill23 - Sept. 4, 2020 16:18:37
User Avatar
Member
5100 posts
Joined: Feb. 2012
Offline
Hi, it's a free lowpoly model from Turbosquid. All the details you see is in the textures.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
  • Quick Links