Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorNicholas Bishop <nicholasbishop@gmail.com>2012-05-25 00:20:12 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2012-05-25 00:20:12 +0400
commit9dc161e8edc421463d4bb0b6237770b4656ca2a7 (patch)
tree63582ddb5ad95bdef84ad2015cdb361a557f6b91 /source
parent75a8de49fc897e3d1076e2121e018ae8cb7c2cbb (diff)
Fix bug [#31512] Focus Zoom on text object with modifers fails
Change BKE_object_minmax() to use the same logic as meshes: use the object bounding box if available, since it will include the modifier DM output.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/object.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 6b9253e9657..098d702a7e2 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -2258,8 +2258,15 @@ void BKE_object_minmax(Object *ob, float min_r[3], float max_r[3])
{
Curve *cu = ob->data;
- if (cu->bb == NULL) BKE_curve_texspace_calc(cu);
- bb = *(cu->bb);
+ /* Use the object bounding box so that modifier output
+ gets taken into account */
+ if (ob->bb)
+ bb = *(ob->bb);
+ else {
+ if (cu->bb == NULL)
+ BKE_curve_texspace_calc(cu);
+ bb = *(cu->bb);
+ }
for (a = 0; a < 8; a++) {
mul_m4_v3(ob->obmat, bb.vec[a]);