Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Tönne <lukas.toenne@gmail.com>2014-06-29 15:24:50 +0400
committerLukas Tönne <lukas.toenne@gmail.com>2014-06-29 15:31:46 +0400
commit4236e3bebf693912102f79102c1ae5389b7536c5 (patch)
tree413d0bd9a4c2043d6beb6544b274e05b835c3026 /source/blender/editors/space_view3d
parent50ca320f57d0d230339b2811a5a18c850c8507a8 (diff)
Fix T40850: object emitter of particles not visible in viewport when GLSL and "only render" checked.
Objects were hidden in "only render" mode if they were duplicators. This is correct in general, but for particles should be disabled by the "show emitter" option.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/drawobject.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 0e010eff94d..196507f133c 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -7171,16 +7171,19 @@ 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;
bool particle_skip_object = false; /* Draw particles but not their emitter object. */
if (ob != scene->obedit) {
- if (ob->restrictflag & OB_RESTRICT_VIEW) {
- return;
- }
- else if (render_override && ((ob->restrictflag & OB_RESTRICT_RENDER) ||
- (ob->transflag & OB_DUPLI)))
- {
- return;
+ if (ob->restrictflag & OB_RESTRICT_VIEW)
+ skip_object = true;
+
+ if (render_override) {
+ if (ob->restrictflag & OB_RESTRICT_RENDER)
+ skip_object = true;
+
+ if (ob->transflag & OB_DUPLI)
+ skip_object = true; /* note: can be reset by particle "draw emitter" below */
}
}
@@ -7197,6 +7200,7 @@ 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;
}
@@ -7204,6 +7208,9 @@ 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 */