diff options
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 26 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 1 |
2 files changed, 15 insertions, 12 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 5413aa88ab6..95797fd9afc 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -3603,19 +3603,21 @@ static int draw_mesh_object(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D } } - /* GPU_begin_object_materials checked if this is needed */ - if (do_alpha_after) { - if (ob->dtx & OB_DRAWXRAY) { - add_view3d_after(&v3d->afterdraw_xraytransp, base, flag); - } - else { - add_view3d_after(&v3d->afterdraw_transp, base, flag); + if ((flag & DRAW_PICKING) == 0 && (base->flag & OB_FROMDUPLI) == 0) { + /* GPU_begin_object_materials checked if this is needed */ + if (do_alpha_after) { + if (ob->dtx & OB_DRAWXRAY) { + add_view3d_after(&v3d->afterdraw_xraytransp, base, flag); + } + else { + add_view3d_after(&v3d->afterdraw_transp, base, flag); + } } - } - else if (ob->dtx & OB_DRAWXRAY && ob->dtx & OB_DRAWTRANSP) { - /* special case xray+transp when alpha is 1.0, without this the object vanishes */ - if (v3d->xray == 0 && v3d->transp == 0) { - add_view3d_after(&v3d->afterdraw_xray, base, flag); + else if (ob->dtx & OB_DRAWXRAY && ob->dtx & OB_DRAWTRANSP) { + /* special case xray+transp when alpha is 1.0, without this the object vanishes */ + if (v3d->xray == 0 && v3d->transp == 0) { + add_view3d_after(&v3d->afterdraw_xray, base, flag); + } } } diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 682d8950440..6eff4a6dce9 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1715,6 +1715,7 @@ typedef struct View3DAfter { void add_view3d_after(ListBase *lb, Base *base, int flag) { View3DAfter *v3da = MEM_callocN(sizeof(View3DAfter), "View 3d after"); + BLI_assert((base->flag & OB_FROMDUPLI) == 0); BLI_addtail(lb, v3da); v3da->base = base; v3da->flag = flag; |