array attributes to python
11132 9 1- orr
- Member
- 98 posts
- Joined: 1月 2008
- Offline
- Anonymous
- Member
- 678 posts
- Joined: 7月 2005
- Offline
Have you solved this?
I'm facing the same problem. floatAttribValue() is for attribs of size 1, floatListAttribValue() should in theory return tuple, but it looks that it's only for vectors and such, not when you have array.
Let's say you have on each point, anyone knows how to access array attribute per point in Python?
I'm facing the same problem. floatAttribValue() is for attribs of size 1, floatListAttribValue() should in theory return tuple, but it looks that it's only for vectors and such, not when you have array.
Let's say you have on each point, anyone knows how to access array attribute per point in Python?
- jrichards
- Member
- 5 posts
- Joined: 8月 2014
- Offline
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!
- goldleaf
- スタッフ
- 4200 posts
- Joined: 9月 2007
- Online
- jrichards
- Member
- 5 posts
- Joined: 8月 2014
- Offline
- aeaeaeae
- Member
- 135 posts
- Joined: 8月 2010
- Offline
Hei, I'm suffering from the same problem! Any chance this will be fixed soon?
Edited by aeaeaeae - 2016年7月8日 07:31:44
B-System for Houdini [ae43ae43.gumroad.com]: instance editor, blender like interface.
- aeaeaeae
- Member
- 135 posts
- Joined: 8月 2010
- Offline
is this fixed yet??
B-System for Houdini [ae43ae43.gumroad.com]: instance editor, blender like interface.
- jlait
- スタッフ
- 6416 posts
- Joined: 7月 2005
- Online
- caleb
- Member
- 30 posts
- Joined: 7月 2005
- Offline
- jsmack
- Member
- 8047 posts
- Joined: 9月 2011
- Offline
Hi Caleb,
You can find it under hou.Geometry or one of the geometry class pages such as hou.Point.
http://www.sidefx.com/docs/houdini/hom/hou/Geometry#intListAttribValue [www.sidefx.com]
http://www.sidefx.com/docs/houdini/hom/hou/Point#intListAttribValue [www.sidefx.com]
You can find it under hou.Geometry or one of the geometry class pages such as hou.Point.
http://www.sidefx.com/docs/houdini/hom/hou/Geometry#intListAttribValue [www.sidefx.com]
http://www.sidefx.com/docs/houdini/hom/hou/Point#intListAttribValue [www.sidefx.com]
-
- Quick Links