Me again. I’m having some trouble figuring out how to use the bpy.data.objects[“Obj”].bound_box property. Printing the property only gives me
<bpy_float, Object.bound_box> #Obj is a cube = 8 verts
Printing bound_box[n] (where n is any number from 0 to 8) gives me
I’m not sure where the 3 comes from.
Also, using the following code throws me an error, saying the key is invalid and should be an int (which it is, isn’t it?).
for i in obj.bound_box: print(obj.bound_box[i])
As for my last question on this subject, how could I use this information properly? Let’s say I want to create an object on a random location, as long as it’s (not) intersecting with this example’s obj. I could easily cheat for a cube object (randrange for x, y, z, determining min and max for each by adding/ subtracting dimension/2 to the center point), but I can’t for more complex shapes.
This is really boggling my mind right now. =P
As always, thanks in advance!