From 65b03129041f42dabe1cdfd5154fc6efa6e1e758 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 13 Apr 2019 12:23:07 +0200 Subject: 3D View: move gizmo draw options out of overlays Gizmo's now have their own popover in preparation for making transform gizmos accessible without having to use tools See: T63518 --- source/blender/editors/space_view3d/view3d_draw.c | 1 - source/blender/editors/space_view3d/view3d_gizmo_armature.c | 4 +--- source/blender/editors/space_view3d/view3d_gizmo_camera.c | 8 ++------ source/blender/editors/space_view3d/view3d_gizmo_empty.c | 4 +--- source/blender/editors/space_view3d/view3d_gizmo_forcefield.c | 4 +--- source/blender/editors/space_view3d/view3d_gizmo_light.c | 4 +--- source/blender/editors/space_view3d/view3d_gizmo_navigate.c | 2 -- source/blender/editors/space_view3d/view3d_gizmo_ruler.c | 8 ++------ 8 files changed, 8 insertions(+), 27 deletions(-) (limited to 'source/blender/editors/space_view3d') diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 522d081fdd6..3399bda1cfa 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1324,7 +1324,6 @@ void view3d_draw_region_info(const bContext *C, ARegion *ar) BLF_batch_draw_begin(); if ((U.uiflag & USER_SHOW_GIZMO_AXIS) || - (v3d->flag2 & V3D_HIDE_OVERLAYS) || /* No need to display gizmo and this info. */ (v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_NAVIGATE))) { diff --git a/source/blender/editors/space_view3d/view3d_gizmo_armature.c b/source/blender/editors/space_view3d/view3d_gizmo_armature.c index a2b93dcd309..64617b03c5e 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_armature.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_armature.c @@ -125,9 +125,7 @@ static void gizmo_bbone_offset_set( static bool WIDGETGROUP_armature_spline_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt)) { View3D *v3d = CTX_wm_view3d(C); - if ((v3d->flag2 & V3D_HIDE_OVERLAYS) || - (v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_CONTEXT))) - { + if (v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_CONTEXT)) { return false; } diff --git a/source/blender/editors/space_view3d/view3d_gizmo_camera.c b/source/blender/editors/space_view3d/view3d_gizmo_camera.c index 2aa10dc3040..8f0a57375fd 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_camera.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_camera.c @@ -61,9 +61,7 @@ struct CameraWidgetGroup { static bool WIDGETGROUP_camera_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt)) { View3D *v3d = CTX_wm_view3d(C); - if ((v3d->flag2 & V3D_HIDE_OVERLAYS) || - (v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_CONTEXT))) - { + if (v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_CONTEXT)) { return false; } @@ -374,9 +372,7 @@ static bool WIDGETGROUP_camera_view_poll(const bContext *C, wmGizmoGroupType *UN } View3D *v3d = CTX_wm_view3d(C); - if ((v3d->flag2 & V3D_HIDE_OVERLAYS) || - (v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_CONTEXT))) - { + if (v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_CONTEXT)) { return false; } diff --git a/source/blender/editors/space_view3d/view3d_gizmo_empty.c b/source/blender/editors/space_view3d/view3d_gizmo_empty.c index 7d6ec3b782f..b44e48a0670 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_empty.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_empty.c @@ -106,9 +106,7 @@ static bool WIDGETGROUP_empty_image_poll(const bContext *C, wmGizmoGroupType *UN View3D *v3d = CTX_wm_view3d(C); RegionView3D *rv3d = CTX_wm_region_view3d(C); - if ((v3d->flag2 & V3D_HIDE_OVERLAYS) || - (v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_CONTEXT))) - { + if (v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_CONTEXT)) { return false; } diff --git a/source/blender/editors/space_view3d/view3d_gizmo_forcefield.c b/source/blender/editors/space_view3d/view3d_gizmo_forcefield.c index 750a8101a15..8aa5cca4cbf 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_forcefield.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_forcefield.c @@ -49,9 +49,7 @@ static bool WIDGETGROUP_forcefield_poll(const bContext *C, wmGizmoGroupType *UNU { View3D *v3d = CTX_wm_view3d(C); - if ((v3d->flag2 & V3D_HIDE_OVERLAYS) || - (v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_CONTEXT))) - { + if (v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_CONTEXT)) { return false; } diff --git a/source/blender/editors/space_view3d/view3d_gizmo_light.c b/source/blender/editors/space_view3d/view3d_gizmo_light.c index 90f1b60e21a..f8f9951c20e 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_light.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_light.c @@ -51,9 +51,7 @@ static bool WIDGETGROUP_light_spot_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt)) { View3D *v3d = CTX_wm_view3d(C); - if ((v3d->flag2 & V3D_HIDE_OVERLAYS) || - (v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_CONTEXT))) - { + if (v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_CONTEXT)) { return false; } diff --git a/source/blender/editors/space_view3d/view3d_gizmo_navigate.c b/source/blender/editors/space_view3d/view3d_gizmo_navigate.c index acf6aa7e188..a6fd195b04d 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_navigate.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_navigate.c @@ -121,13 +121,11 @@ static bool WIDGETGROUP_navigate_poll(const bContext *C, wmGizmoGroupType *UNUSE { View3D *v3d = CTX_wm_view3d(C); if (((U.uiflag & USER_SHOW_GIZMO_AXIS) == 0) || - (v3d->flag2 & V3D_HIDE_OVERLAYS) || (v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_NAVIGATE))) { return false; } return true; - } static void WIDGETGROUP_navigate_setup(const bContext *UNUSED(C), wmGizmoGroup *gzgroup) diff --git a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c index 09757e13297..f8f92d8bef8 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c @@ -1042,9 +1042,7 @@ static int view3d_ruler_add_invoke(bContext *C, wmOperator *op, const wmEvent *e View3D *v3d = CTX_wm_view3d(C); RegionView3D *rv3d = ar->regiondata; - if ((v3d->flag2 & V3D_HIDE_OVERLAYS) || - (v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_TOOL))) - { + if (v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_TOOL)) { BKE_report(op->reports, RPT_WARNING, "Gizmos hidden in this view"); return OPERATOR_CANCELLED; } @@ -1107,9 +1105,7 @@ static int view3d_ruler_remove_invoke(bContext *C, wmOperator *op, const wmEvent ARegion *ar = CTX_wm_region(C); View3D *v3d = CTX_wm_view3d(C); - if ((v3d->flag2 & V3D_HIDE_OVERLAYS) || - (v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_TOOL))) - { + if (v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_TOOL)) { BKE_report(op->reports, RPT_WARNING, "Gizmos hidden in this view"); return OPERATOR_CANCELLED; } -- cgit v1.2.3