fix for align objects with non mesh objects.
authorCampbell Barton <ideasman42@gmail.com>
Fri, 7 Oct 2011 20:53:54 +0000 (20:53 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 7 Oct 2011 20:53:54 +0000 (20:53 +0000)
release/scripts/startup/bl_operators/object_align.py

index 50e9bfb5b98345270d40962d2299f47c5916b6a3..dd052c36ade46e9ea483bfd8af3b60666c1345be 100644 (file)
@@ -140,7 +140,7 @@ def align_objects(align_x,
 
     for obj, bb_world in objs:
 
-        if bb_quality:
+        if bb_quality and obj.type == 'MESH':
             GBB = GlobalBB_HQ(obj)
         else:
             GBB = GlobalBB_LQ(bb_world)
@@ -204,7 +204,7 @@ def align_objects(align_x,
         matrix_world = obj.matrix_world.copy()
         bb_world = [matrix_world * Vector(v[:]) for v in obj.bound_box]
 
-        if bb_quality:
+        if bb_quality and obj.type == 'MESH':
             GBB = GlobalBB_HQ(obj)
         else:
             GBB = GlobalBB_LQ(bb_world)