[Bf-blender-cvs] [b50c6e3] master: Object Align Operator: Make it use modifiers in high quality bounding box calculation

Daniel Salazar noreply at git.blender.org
Sat May 2 00:22:08 CEST 2015


Commit: b50c6e3f6f9f50a6e8e5e84844f00eca07ef8ec9
Author: Daniel Salazar
Date:   Fri May 1 16:17:23 2015 -0600
Branches: master
https://developer.blender.org/rBb50c6e3f6f9f50a6e8e5e84844f00eca07ef8ec9

Object Align Operator: Make it use modifiers in high quality bounding box calculation

===================================================================

M	release/scripts/startup/bl_operators/object_align.py

===================================================================

diff --git a/release/scripts/startup/bl_operators/object_align.py b/release/scripts/startup/bl_operators/object_align.py
index e843209..916a9f6 100644
--- a/release/scripts/startup/bl_operators/object_align.py
+++ b/release/scripts/startup/bl_operators/object_align.py
@@ -70,7 +70,9 @@ def GlobalBB_HQ(obj):
 
     # Initialize the variables with the last vertex
 
-    verts = obj.data.vertices
+    me = obj.to_mesh(scene=bpy.context.scene, apply_modifiers=True, settings='PREVIEW')
+    verts = me.vertices
+    bpy.data.meshes.remove(me)
 
     val = matrix_world * verts[-1].co




More information about the Bf-blender-cvs mailing list