diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-05-04 10:47:17 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-05-04 10:47:17 +0300 |
commit | b2e908f929d488752290901163fdd4fc20af9b34 (patch) | |
tree | 5096e9cc7e726a9c1250acd3e14861f92b953c85 /source/blender/editors/space_view3d/drawobject.c | |
parent | e87ddda149b49746b33f843d32bfe5df06322336 (diff) |
Fix relationship lines visibility test for legacy viewport
Diffstat (limited to 'source/blender/editors/space_view3d/drawobject.c')
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 34e446a5a26..d5363540dcf 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -62,6 +62,7 @@ #include "BKE_global.h" #include "BKE_image.h" #include "BKE_key.h" +#include "BKE_layer.h" #include "BKE_lattice.h" #include "BKE_main.h" #include "BKE_mesh.h" @@ -9179,13 +9180,16 @@ afterdraw: draw_hooks(ob, pos); /* help lines and so */ - if (ob != scene->obedit && ob->parent && (ob->parent->lay & v3d->lay)) { - setlinestyle(3); - immBegin(PRIM_LINES, 2); - immVertex3fv(pos, ob->obmat[3]); - immVertex3fv(pos, ob->orig); - immEnd(); - setlinestyle(0); + if (ob != scene->obedit && ob->parent) { + Base *base_parent = BKE_scene_layer_base_find(sl, ob->parent); + if ((base_parent->flag & BASE_VISIBLED) != 0) { + setlinestyle(3); + immBegin(PRIM_LINES, 2); + immVertex3fv(pos, ob->obmat[3]); + immVertex3fv(pos, ob->orig); + immEnd(); + setlinestyle(0); + } } /* Drawing the constraint lines */ |