added an optional arg for object.getBoundBox(worldspace) - so you can get localspace boundboxes, this is useful when getting a dipli's boundbox where the objects worldspace matrix has no useful meaning.

This commit is contained in:
2008-04-07 13:16:56 +00:00
parent 66e74e6057
commit 7c15baff16
2 changed files with 35 additions and 20 deletions

View File

@@ -1178,10 +1178,12 @@ class Object:
- 1 - selected
"""
def getBoundBox():
def getBoundBox(worldspace=1):
"""
Returns the worldspace bounding box of this object. This works for meshes (out of
edit mode) and curves.
@type worldspace: int
@param worldspace: An optional argument. When zero, the bounding values will be localspace.
@rtype: list of 8 (x,y,z) float coordinate vectors (WRAPPED DATA)
@return: The coordinates of the 8 corners of the bounding box. Data is wrapped when
bounding box is present.