I can't convert a simple [0, 20, 0, 20, 0, 20] to a list.
Code:
geo = hou.pwd().geometry()
print geo.boundingBox()
print type(geo.boundingBox())
Output:
[0, 20, 0, 20, 0, 20]
<class 'hou.BoundingBox'>
Test:
list(geo.boundingBox())
len(geo.boundingBox())
I get the following error:
object BoundingBox is not iterable.
Object of type 'BoundingBox' has no len()
I read all the related questions but they don't seem to solve my problem.
hou.BoundingBox? Are you able to get it's size by callinglen(geo.boundingBox())(or similar)? Are you able to index into it (geo.boundingBox()[1])?BoundingBoxes, no they don't. If you mean they return the same type as each other, I don't see why that matters.__len__and__getitem__. Ignacio's answer shows you how.