Hi,
I am trying to access the second value of the float attribute (size of 3). How can I do this? Let say I have an attribute named centroid:
geo = hou.pwd().geometry()
geo.primFloatAttribValues('centroid1')
hou.hscriptExpression('prim(“../” + opinput(“.”, 0), $PR, “centroid”, 1)')
if I set the size back to 1 the following line works:
geo.primFloatAttribValues('centroid')
I assume the the attribute with the size greater then one returns a list or atuple. I tried to display it with following method which fails as well.
hou.ui.displayMessage(str(value(1)))
hou.ui.displayMessage(str(value))
I guess the same things is with vector attributes. Can somebody put me on a right track, please.
Thanks.
Kuba
python - query the second/third component of an attribute
5189 4 0-
- kuba
- Member
- 345 posts
- Joined:
- Offline
-
- jacob clark
- Member
- 665 posts
- Joined: July 2005
- Offline
-
- rdg
- Member
- 401 posts
- Joined:
- Offline
-
- jacob clark
- Member
- 665 posts
- Joined: July 2005
- Offline
-
- rdg
- Member
- 401 posts
- Joined:
- Offline
-
- Quick Links

