[Bf-blender-cvs] [2a35383bb0b] master: Fix T72353: Camera Limits Visibility

Jeroen Bakker noreply at git.blender.org
Wed Dec 18 11:00:13 CET 2019


Commit: 2a35383bb0b49dd7a7ee0c507ec012372587f6e5
Author: Jeroen Bakker
Date:   Wed Dec 11 14:47:35 2019 +0100
Branches: master
https://developer.blender.org/rB2a35383bb0b49dd7a7ee0c507ec012372587f6e5

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

===================================================================

M	source/blender/draw/engines/overlay/overlay_engine.c

===================================================================

diff --git a/source/blender/draw/engines/overlay/overlay_engine.c b/source/blender/draw/engines/overlay/overlay_engine.c
index 06044ff92b3..fe39b8580e3 100644
--- a/source/blender/draw/engines/overlay/overlay_engine.c
+++ b/source/blender/draw/engines/overlay/overlay_engine.c
@@ -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;



More information about the Bf-blender-cvs mailing list