diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-11-25 20:12:07 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-11-25 20:12:07 +0400 |
commit | 20b46bbf1a9e5a46d308df7f8aa4f2014485d841 (patch) | |
tree | fa28198e75de5255bea5d60194391cc4153d1e75 | |
parent | ea828fd20e87443bfbd3045ac1a077f20e35e564 (diff) |
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.
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 15 |
1 files 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; |