From 476af8c06a999c8848680ff19bb07d93602e1074 Mon Sep 17 00:00:00 2001 From: Matt Ebb Date: Tue, 21 Nov 2006 03:22:34 +0000 Subject: [PATCH] * Dupli objects (dupliverts, dupligroup, etc) now get invisibility based on their parent object, not the original instantiated objects. i.e, if an object is invisible, its child dupli objects will be too. --- source/blender/src/drawobject.c | 9 ++++++++- source/blender/src/drawview.c | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c index 22d167b1ce0..e01d96964d6 100644 --- a/source/blender/src/drawobject.c +++ b/source/blender/src/drawobject.c @@ -3650,7 +3650,14 @@ void draw_object(Base *base, int flag) ob= base->object; - if (!(G.obedit) && (ob->restrictflag & OB_RESTRICT_VIEW)) return; + if (!(G.obedit)) { + /* + * Always draw dupli objects here, restriction of those is governed by the flag of their duplicator + * object, in drawview.c, draw_dupli_objects() + */ + if ((ob->restrictflag & OB_RESTRICT_VIEW) && !(base->flag & OB_FROMDUPLI)) + return; + } /* xray delay? */ if((flag & DRAW_PICKING)==0 && (base->flag & OB_FROMDUPLI)==0) { diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c index 84b48904d26..52e287336ee 100644 --- a/source/blender/src/drawview.c +++ b/source/blender/src/drawview.c @@ -2647,6 +2647,8 @@ static void draw_dupli_objects(View3D *v3d, Base *base) short transflag; char dt, dtx; + if (base->object->restrictflag & OB_RESTRICT_VIEW) return; + /* debug */ if(base->object->dup_group && base->object->dup_group->id.us<1) color= TH_REDALERT;