Valent Posted March 23, 2020 Share Posted March 23, 2020 Hi, I'd like to create some attributes inside a loop (for/foreach) and I need them to have the loop number as the part of their name. Can I do that? Quote Link to comment Share on other sites More sharing options...
Noobini Posted March 23, 2020 Share Posted March 23, 2020 sure, name as example, I've left the name node in there but same as creating an attribute name. vu_namefromiter.hiplc 1 Quote Link to comment Share on other sites More sharing options...
anim Posted March 23, 2020 Share Posted March 23, 2020 fin case you mean VEX for loop, here is one: float default = 0.0; for (int i=0; i<10; i++){ string name = "attrib" + itoa(i); addpointattrib(0, name, default); } of course you can directly use setpointattrib() which will create one if doesnt exist as well as sets values, but really depends on what you are trying to do 2 Quote Link to comment Share on other sites More sharing options...
Valent Posted March 23, 2020 Author Share Posted March 23, 2020 @Noobini I was looking for VEX solution but Thanks anyway, it is good to have a working example. @anim Thanks, that was exactly what I was looking for! so I was thinking in the right direction but messed up the syntax) (that defvalue[] in the 'adpointattrib' was quite confusing) Quote Link to comment Share on other sites More sharing options...
Noobini Posted March 23, 2020 Share Posted March 23, 2020 not to worry, someone else might find it useful Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.