[Bf-blender-cvs] [b2e908f929d] blender2.8: Fix relationship lines visibility test for legacy viewport
Dalai Felinto
noreply at git.blender.org
Thu May 4 09:48:14 CEST 2017
Commit: b2e908f929d488752290901163fdd4fc20af9b34
Author: Dalai Felinto
Date: Thu May 4 09:47:17 2017 +0200
Branches: blender2.8
https://developer.blender.org/rBb2e908f929d488752290901163fdd4fc20af9b34
Fix relationship lines visibility test for legacy viewport
===================================================================
M source/blender/editors/space_view3d/drawobject.c
===================================================================
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 */
More information about the Bf-blender-cvs
mailing list