From 4256ad75666a119bdcea3726c3d524ff92870ae0 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Sun, 20 Jan 2013 00:19:57 +0000 Subject: Update object bounding box during sculpt Fixes the sculpt object being incorrectly clipped during drawing due to an out-of-date bounding box making it seem that the object had gone outside the view. Added a BKE_pbvh function to get the top-level bounding box. In sculpt_flush_update(), where the PBVH bounds are updated, the result is copied to the object's bounding box. Fixes bug [#33790] projects.blender.org/tracker/?func=detail&aid=33790&group_id=9&atid=498 --- source/blender/blenkernel/BKE_pbvh.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/blenkernel/BKE_pbvh.h') diff --git a/source/blender/blenkernel/BKE_pbvh.h b/source/blender/blenkernel/BKE_pbvh.h index 709db7e4570..99ed978561e 100644 --- a/source/blender/blenkernel/BKE_pbvh.h +++ b/source/blender/blenkernel/BKE_pbvh.h @@ -113,6 +113,9 @@ typedef enum { PBVHType BKE_pbvh_type(const PBVH *bvh); +/* Get the PBVH root's bounding box */ +void BKE_pbvh_bounding_box(const PBVH *bvh, float min[3], float max[3]); + /* multires hidden data, only valid for type == PBVH_GRIDS */ unsigned int **BKE_pbvh_grid_hidden(const PBVH *bvh); -- cgit v1.2.3