magneto Posted November 3, 2013 Share Posted November 3, 2013 (edited) Hi, I don't see the add attribute syntax for arrays. addattribute VEX function supports this but I think this function is not available in Wrangle SOPs. Any idea how to do this in Wrangle SOPs? Because otherwise this prevents the use of Wrangle SOPs. Thanks EDIT: Actually I don't think I can use Wrangle SOPs anyway because the point VEX function also doesn't have the array return overload, unlike his sister import function, which does support returning arrays. This separation is very confusing, and I hope these are unified so we don't have one in one but not the other and vice versa Edited November 3, 2013 by magneto Quote Link to comment Share on other sites More sharing options...
anim Posted November 3, 2013 Share Posted November 3, 2013 it should work for Point Wrangle SOP as it is based on VOP SOP: float a[] = array(1, 2, 3, 4, 5);addattribute("attrib", a, arraylength(a));[/CODE]however it may be different for Wrangle SOPs based on CVEX such as (Attrib Wrangle, Volume Wrangle...) since they may not support all VEX functions yet 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted November 3, 2013 Author Share Posted November 3, 2013 (edited) Thanks anim, that seems to work. So now only 2 problems exist. 1. I still need a way to import array attribute values from the second input. 2. When I use the above code you posted, the attribute values are bizarre for some reason. If I am not wrong, they all should have 1,2,3,4,5 as attrib values. Here is how it looks in the Details View: EDIT: Also I just tried it and #2 seems to work perfectly in 12.5, but in 13.0.222 has the problem shown in the above picture. EDIT2: Changing the attribute name will change the values "randomly" every time. Edited November 3, 2013 by magneto Quote Link to comment Share on other sites More sharing options...
anim Posted November 3, 2013 Share Posted November 3, 2013 (edited) not sure what's going on in your scene so here is an example file it just creates array attribute using Point Wrangle then another Point wrangle will get that attribute from first and second input and add the values together to produce resulting array EDIT: oh, and I'm using 12.5.376 didn't test with 13 ts_array_attribs_pointwrangle.hipnc Edited November 3, 2013 by anim 2 Quote Link to comment Share on other sites More sharing options...
magneto Posted November 3, 2013 Author Share Posted November 3, 2013 Thanks alot anim, glad that I can now use import. But yeah 13 still has the same weird values. 12.5 works perfectly. 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.