From 20b46bbf1a9e5a46d308df7f8aa4f2014485d841 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 25 Nov 2012 16:12:07 +0000 Subject: [PATCH] Fix #33291: when using boundbox drawtype for a large number of duplicated objects, enabling Wire draw on the parent would draw full resolution wires for all the instances which can be very slow. So for boundbox those draw extras options are not inherited now. --- source/blender/editors/space_view3d/view3d_draw.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 83572d77479..fcd92cd5639 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1931,10 +1931,17 @@ static void draw_dupli_objects_color(Scene *scene, ARegion *ar, View3D *v3d, Bas for (; dob; dob_prev = dob, dob = dob_next, dob_next = dob_next ? dupli_step(dob_next->next) : NULL) { tbase.object = dob->ob; - /* extra service: draw the duplicator in drawtype of parent */ - /* MIN2 for the drawtype to allow bounding box objects in groups for lods */ - dt = tbase.object->dt; tbase.object->dt = MIN2(tbase.object->dt, base->object->dt); - dtx = tbase.object->dtx; tbase.object->dtx = base->object->dtx; + /* extra service: draw the duplicator in drawtype of parent, minimum taken + * to allow e.g. boundbox box objects in groups for LOD */ + dt = tbase.object->dt; + tbase.object->dt = MIN2(tbase.object->dt, base->object->dt); + + /* inherit draw extra, but not if a boundbox under the assumption that this + * is intended to speed up drawing, and drawing extra (especially wire) can + * slow it down too much */ + dtx = tbase.object->dtx; + if(tbase.object->dt != OB_BOUNDBOX) + tbase.object->dtx = base->object->dtx; /* negative scale flag has to propagate */ transflag = tbase.object->transflag;