diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-07-12 14:27:22 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-07-12 14:27:22 +0400 |
commit | f7f216262da9c809e2899d588f458db201f863a8 (patch) | |
tree | 55aa5b3c1c2269f2c1c2df60127a1cdddc210ec8 /source/blender | |
parent | c86d31cc55f98ebebdf8af0c76b89eb3b891f7a6 (diff) |
Fix #32041: Empty display size is not taken into account for centering view
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 2ba2ad7bd6e..a3145ddeedd 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -2300,14 +2300,21 @@ void BKE_object_minmax(Object *ob, float min_r[3], float max_r[3]) } if (change == FALSE) { + float size[3]; + + copy_v3_v3(size, ob->size); + if (ob->type == OB_EMPTY) { + mul_v3_fl(size, ob->empty_drawsize); + } + minmax_v3v3_v3(min_r, max_r, ob->obmat[3]); copy_v3_v3(vec, ob->obmat[3]); - add_v3_v3(vec, ob->size); + add_v3_v3(vec, size); minmax_v3v3_v3(min_r, max_r, vec); copy_v3_v3(vec, ob->obmat[3]); - sub_v3_v3(vec, ob->size); + sub_v3_v3(vec, size); minmax_v3v3_v3(min_r, max_r, vec); } } |