VEX WRANGLE: Is there more efficient/user friendly way to handle attributes with "For each" -statement in vex, than using those that takes string arguments like addattrib, setattrib, attrib.. Now I'm using sprintf to concate my foreach attribute names and then handling attributes with those strings. Would be great to have for each binding e.g.
v@my_`for_each`_attribute = {0,0,0};
Or is there something similar? Thanks!
Example from my code:
string legs[] = {"F_L_","F_R_","M_L_","M_R_","B_L_","B_R_"};
foreach (int leg_num; string leg; legs)
{
string leg_pos = sprintf("%s", concat(leg, "pos"));
string leg_ray = sprintf("%s", concat(leg, "ray"));
if( attrib(0, "point", leg_pos, @id) == 0;)
{
setattrib( geoself(), "point", leg_pos, @id, -1, ray_pos, "set");
}
}