Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-10-08 09:07:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-10-08 09:07:56 +0300
commitebe216f532845069bc5bb7b45e2eda03756b81cc (patch)
treee7b4431caf75e1d5432a7e76c8c52ae1974029d4 /source/blender/editors/interface
parentde07bf2b13e8239b5175e9c4b79fc09f096b1b86 (diff)
Sequencer: add option to toggle gizmos
Use shortcut matching the 3D view & popover in the header
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/view2d_gizmo_navigate.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/editors/interface/view2d_gizmo_navigate.c b/source/blender/editors/interface/view2d_gizmo_navigate.c
index 30b4a7c097a..3ff5b471731 100644
--- a/source/blender/editors/interface/view2d_gizmo_navigate.c
+++ b/source/blender/editors/interface/view2d_gizmo_navigate.c
@@ -127,11 +127,24 @@ struct NavigateWidgetGroup {
int region_size[2];
};
-static bool WIDGETGROUP_navigate_poll(const bContext *UNUSED(C), wmGizmoGroupType *UNUSED(gzgt))
+static bool WIDGETGROUP_navigate_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt))
{
if ((U.uiflag & USER_SHOW_GIZMO_NAVIGATE) == 0) {
return false;
}
+ ScrArea *area = CTX_wm_area(C);
+ if (area == NULL) {
+ return false;
+ }
+ switch (area->spacetype) {
+ case SPACE_SEQ: {
+ const SpaceSeq *sseq = area->spacedata.first;
+ if (sseq->gizmo_flag & (SEQ_GIZMO_HIDE | SEQ_GIZMO_HIDE_NAVIGATE)) {
+ return false;
+ }
+ break;
+ }
+ }
return true;
}