[Bf-blender-cvs] [76e7c039ec5] master: Fix T52140: Align objects centers using origin for text

Sergey Sharybin noreply at git.blender.org
Wed Sep 13 14:40:16 CEST 2017


Commit: 76e7c039ec501e64f55b293a17aee1968cdb7aeb
Author: Sergey Sharybin
Date:   Wed Sep 13 17:38:20 2017 +0500
Branches: master
https://developer.blender.org/rB76e7c039ec501e64f55b293a17aee1968cdb7aeb

Fix T52140: Align objects centers using origin for text

The issue was caused by operator redo which frees all object's evaluated data,
including bounding box. This bounding box can not be reconstructed properly
without full curve evaluation (need to at least convert font to nurbs, which is
not cheap already).

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

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 1539ffb3545..b7d3866989d 100644
--- a/release/scripts/startup/bl_operators/object_align.py
+++ b/release/scripts/startup/bl_operators/object_align.py
@@ -131,6 +131,11 @@ def align_objects(context,
 
     cursor = (space if space and space.type == 'VIEW_3D' else scene).cursor_location
 
+    # We are accessing runtime data such as evaluated bounding box, so we need to
+    # be sure it is properly updated and valid (bounding box might be lost on operator
+    # redo).
+    scene.update()
+
     Left_Front_Up_SEL = [0.0, 0.0, 0.0]
     Right_Back_Down_SEL = [0.0, 0.0, 0.0]



More information about the Bf-blender-cvs mailing list