Fix T72353: Camera Limits Visibility

Due to recent refactoring of the overlay unification the camera limits
were also visible when the overlays were turned off. This was because
the `draw_extra` had an exception for when looking through the camera.

This change also takes the global hide overlays into account. So now the
camera limits will not be drawn when overlays are turned off. This also
fixed other camera related overlay drawing.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6394
This commit is contained in:
Jeroen Bakker
2019-12-11 14:47:35 +01:00
parent b30a722f2d
commit 2a35383bb0

View File

@@ -202,9 +202,10 @@ static void OVERLAY_cache_populate(void *vedata, Object *ob)
const bool draw_bone_selection = (ob->type == OB_MESH) && pd->armature.do_pose_fade_geom &&
!is_select;
const bool draw_extras =
((pd->overlay.flag & V3D_OVERLAY_HIDE_OBJECT_XTRAS) == 0) ||
/* Show if this is the camera we're looking through since it's useful for selecting. */
((draw_ctx->rv3d->persp == RV3D_CAMOB) && ((ID *)draw_ctx->v3d->camera == ob->id.orig_id));
(!pd->hide_overlays) &&
(((pd->overlay.flag & V3D_OVERLAY_HIDE_OBJECT_XTRAS) == 0) ||
/* Show if this is the camera we're looking through since it's useful for selecting. */
((draw_ctx->rv3d->persp == RV3D_CAMOB) && ((ID *)draw_ctx->v3d->camera == ob->id.orig_id)));
const bool draw_motion_paths = (pd->overlay.flag & V3D_OVERLAY_HIDE_MOTION_PATHS) == 0;