array attributes to python
12501 9 1-
- orr
- Member
- 98 posts
- Joined: Jan. 2008
- Offline
-
- Anonymous
- Member
- 678 posts
- Joined: July 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: Aug. 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
- Staff
- 4259 posts
- Joined: Sept. 2007
- Offline
-
- jrichards
- Member
- 5 posts
- Joined: Aug. 2014
- Offline
-
- aeaeaeae
- Member
- 140 posts
- Joined: Aug. 2010
- Online
Hei, I'm suffering from the same problem! Any chance this will be fixed soon?
Edited by aeaeaeae - July 8, 2016 07:31:44
B-System for Houdini [ae43ae43.gumroad.com]: instance editor, blender like interface.
-
- aeaeaeae
- Member
- 140 posts
- Joined: Aug. 2010
- Online
is this fixed yet??
B-System for Houdini [ae43ae43.gumroad.com]: instance editor, blender like interface.
-
- jlait
- Staff
- 6743 posts
- Joined: July 2005
- Offline
-
- caleb
- Member
- 30 posts
- Joined: July 2005
- Offline
-
- jsmack
- Member
- 8173 posts
- Joined: Sept. 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