diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2015-08-13 19:12:08 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-08-13 19:12:08 +0300 |
commit | 3fa0a1a5bc0ff28328930ee12608497262b25912 (patch) | |
tree | ad87ae294bdfbc8e24add38f97dee41222a27ab0 /source/blender/blenkernel/intern/object.c | |
parent | d2383ec6c07a298a290b83ba8347618e3b46c9d9 (diff) |
Add real boundbox support to lattice, and update armature one.
* draw lattice boundingboxes in 3dView [if "show_bounds" is used -- an option previously pretty useless for lattices]
* give proper values for lattice objects ".bound_box" in bpy
* give proper values for armature objects ".bound_box" in bpy
* lets users use "Dimensions" [in 3dView Transform panel] on lattices and armatures
* remove redundant calculations in "boundbox_armature()"
Armatures boundingboxes were already drawn in 3dView, if "show_bounds" was used.
Based on report T45735: Lattice's bounding_box doesn't update,
and a comment in code by @campbellbarton ("later we may want to add dimensions for lattice, armature etc too").
Revision: https://developer.blender.org/D1460
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 65599896f02..f8bfd46bb6e 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -114,6 +114,7 @@ #include "BKE_material.h" #include "BKE_camera.h" #include "BKE_image.h" +#include "BKE_lattice.h" #ifdef WITH_MOD_FLUID #include "LBM_fluidsim.h" @@ -2652,6 +2653,12 @@ BoundBox *BKE_object_boundbox_get(Object *ob) else if (ob->type == OB_MBALL) { bb = ob->bb; } + else if (ob->type == OB_LATTICE) { + bb = BKE_lattice_boundbox_get(ob); + } + else if (ob->type == OB_ARMATURE) { + bb = BKE_armature_boundbox_get(ob); + } return bb; } |