jrichards

jrichards

About Me

Connect

LOCATION
Not Specified
ウェブサイト

Houdini Skills

Availability

Not Specified

Recent Forum Posts

array attributes to python 2016年2月9日17:43

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!

array attributes to python 2016年2月9日15:06

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!

Creating an integer array attribute with HDK? 2016年2月3日20:59

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!