diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-07-18 01:49:08 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-07-18 01:49:08 +0400 |
commit | 8620008ccdda5ca7d7b83cb6b1a24e62f881ee84 (patch) | |
tree | 1c58b7108fa8824544e973c4bbb4308bc30c5ea2 | |
parent | 1097a3f70d92f888f62a02bb7fb53a25b1059c7b (diff) |
Fix T41113: Hide doesn't work on particle systems
Particles could completely cancel Hide flag! 'Accumulative' bool is not a really good idea here,
hide (or render-hide) are some kind of 'absolute' no-go.
Found another issue in that area, duplicated objects would still show in 'render override' mode,
when object was render-disabled.
Hopefully things are better now.
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 16 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 1 |
2 files changed, 7 insertions, 10 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 196507f133c..c1689ef06db 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -7171,23 +7171,23 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short const bool is_obact = (ob == OBACT); const bool render_override = (v3d->flag2 & V3D_RENDER_OVERRIDE) != 0; const bool is_picking = (G.f & G_PICKSEL) != 0; - bool skip_object = false; + const bool has_particles = (ob->particlesystem.first != NULL); bool particle_skip_object = false; /* Draw particles but not their emitter object. */ if (ob != scene->obedit) { if (ob->restrictflag & OB_RESTRICT_VIEW) - skip_object = true; + return; if (render_override) { if (ob->restrictflag & OB_RESTRICT_RENDER) - skip_object = true; + return; - if (ob->transflag & OB_DUPLI) - skip_object = true; /* note: can be reset by particle "draw emitter" below */ + if (!has_particles && (ob->transflag & OB_DUPLI)) + return; } } - if (ob->particlesystem.first) { + if (has_particles) { /* XXX particles are not safe for simultaneous threaded render */ if (G.is_rendering) { return; @@ -7200,7 +7200,6 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short for (psys = ob->particlesystem.first; psys; psys = psys->next) { /* Once we have found a psys which renders its emitter object, we are done. */ if (psys->part->draw & PART_DRAW_EMITTER) { - skip_object = false; particle_skip_object = false; break; } @@ -7208,9 +7207,6 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short } } - if (skip_object) - return; - /* xray delay? */ if ((dflag & DRAW_PICKING) == 0 && (base->flag & OB_FROMDUPLI) == 0 && (v3d->flag2 & V3D_RENDER_SHADOW) == 0) { /* don't do xray in particle mode, need the z-buffer */ diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 4adfa845299..dd08339cc94 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1981,6 +1981,7 @@ static void draw_dupli_objects_color( DupliApplyData *apply_data; if (base->object->restrictflag & OB_RESTRICT_VIEW) return; + if ((base->object->restrictflag & OB_RESTRICT_RENDER) && (v3d->flag2 & V3D_RENDER_OVERRIDE)) return; if (dflag & DRAW_CONSTCOLOR) { BLI_assert(color == TH_UNDEFINED); |