VEX Attribute name as string from channel

   8491   3   3
User Avatar
Member
4 posts
Joined: 1月 2015
Offline
Hi,
I am trying to find a way how to turn any string into an attribute name using VEX.
I have an wrangle posterising attribute but rather than hardcoding the attribute name I want to use String Channel to define which attribute to use, is there a way to do it? something like @'chs(“attributeName”)'… ?
Thanks
User Avatar
Member
459 posts
Joined: 10月 2011
Offline
Hi
Will this work for you?
string name = chs("attributeName");
int newatt = addattrib(0, "point", name, "...");

-b
http://www.racecar.no [www.racecar.no]
User Avatar
スタッフ
748 posts
Joined: 10月 2012
Offline
On the Bindings tab, add a binding and set the Attribute Name to reference your string parameter, and set the VEX Parameter to the name you want to use in the VEX code.
User Avatar
Member
4 posts
Joined: 1月 2015
Offline
Great, thank you!
Both methods work, Binding seems like the cleanest solution..
  • Quick Links