jrichards
jrichards
About Me
Connect
LOCATION
Not Specified
WEBSITE
Houdini Skills
Availability
Not Specified
Recent Forum Posts
array attributes to python Feb. 9, 2016, 5:43 p.m.
I'm working around this by copying this array data with vex to a different attribute type so I can access it in Python. Kinda gross but I'm glad the root problem has been logged.
Thanks yet again goldleaf!
Thanks yet again goldleaf!
array attributes to python Feb. 9, 2016, 3:06 p.m.
I'm having the same problem, trying this with Houdini 14.0.472:
I have an attribute that I created of type “Integer Array” and in Python when I try to access this attr it's not working…
>>> print geo.points().attribValue(“myIntArray”)
0
Stumped, I saw there was another method that looks like what I needed however…
>>> print geo.points().intListAttribValue(“myIntArray”)
(0,)
But the data is there–If I use vex in a wrangle I can get access to the values:
>>> printf(“attr: %g\n”, i@myIntArray);
attr: {2, 26, 50}
I'd rather not write a wrangle to copy this array to an N sized int just to access it in Python but maybe that's what I have to do?
Anyone know how to access array attributes from Python?
thanks!
I have an attribute that I created of type “Integer Array” and in Python when I try to access this attr it's not working…
>>> print geo.points().attribValue(“myIntArray”)
0
Stumped, I saw there was another method that looks like what I needed however…
>>> print geo.points().intListAttribValue(“myIntArray”)
(0,)
But the data is there–If I use vex in a wrangle I can get access to the values:
>>> printf(“attr: %g\n”, i@myIntArray);
attr: {2, 26, 50}
I'd rather not write a wrangle to copy this array to an N sized int just to access it in Python but maybe that's what I have to do?
Anyone know how to access array attributes from Python?
thanks!
Creating an integer array attribute with HDK? Feb. 3, 2016, 8:59 p.m.
Hey goldleaf, thanks so much!
I was using H14 which did not include the code sample you pointed me at but I found it in H15 and was able to create an array attr.
Cheers!
I was using H14 which did not include the code sample you pointed me at but I found it in H15 and was able to create an array attr.
Cheers!