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:
authorLukas Tönne <lukas.toenne@gmail.com>2015-03-23 10:51:08 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2015-03-26 16:13:41 +0300
commitb122777ce74f3be36b065769628fa5105bdc9c8d (patch)
tree49172ac2cd6689133e3d135894c64dc466ab9740 /source
parentd4f48ffc63a4cb71278f4d39f5b5cdda60be9649 (diff)
Use dupli cache in bounding box calculations involving duplis.
This feature is mostly useful for the "view selected" operator. It is also used in the "set origin to geometry" operator, but since the cache overrides the object geometry anyway the effect may not be what users expect (which is acceptable).
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/object.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 5dd71298b0a..007ee306ecb 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -2871,7 +2871,15 @@ bool BKE_object_minmax_dupli(Scene *scene, Object *ob, float r_min[3], float r_m
/* pass */
}
else {
- BoundBox *bb = BKE_object_boundbox_get(dob->ob);
+ BoundBox *bb = NULL;
+ if (ob->dup_cache) {
+ DupliObjectData *dob_data = BKE_dupli_cache_find_data(ob->dup_cache, dob->ob);
+ if (dob_data->cache_dm) {
+ bb = &dob_data->bb;
+ }
+ }
+ if (!bb)
+ bb = BKE_object_boundbox_get(dob->ob);
if (bb) {
int i;