diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-05-25 00:20:12 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-05-25 00:20:12 +0400 |
commit | 9dc161e8edc421463d4bb0b6237770b4656ca2a7 (patch) | |
tree | 63582ddb5ad95bdef84ad2015cdb361a557f6b91 /source/blender | |
parent | 75a8de49fc897e3d1076e2121e018ae8cb7c2cbb (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/blender')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 11 |
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]); |