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/transform/transform_gizmo_2d.c
parentde07bf2b13e8239b5175e9c4b79fc09f096b1b86 (diff)
Sequencer: add option to toggle gizmos
Use shortcut matching the 3D view & popover in the header
Diffstat (limited to 'source/blender/editors/transform/transform_gizmo_2d.c')
-rw-r--r--source/blender/editors/transform/transform_gizmo_2d.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_gizmo_2d.c b/source/blender/editors/transform/transform_gizmo_2d.c
index b25a182926e..a0ca7b84c48 100644
--- a/source/blender/editors/transform/transform_gizmo_2d.c
+++ b/source/blender/editors/transform/transform_gizmo_2d.c
@@ -76,13 +76,27 @@ static bool gizmo2d_generic_poll(const bContext *C, wmGizmoGroupType *gzgt)
}
ScrArea *area = CTX_wm_area(C);
+ if (area == NULL) {
+ return false;
+ }
+
+ /* NOTE: below this is assumed to be a tool gizmo.
+ * If there are cases that need to check other flags - this function could be split. */
switch (area->spacetype) {
case SPACE_IMAGE: {
- SpaceImage *sima = area->spacedata.first;
+ const SpaceImage *sima = area->spacedata.first;
Object *obedit = CTX_data_edit_object(C);
if (!ED_space_image_show_uvedit(sima, obedit)) {
return false;
}
+ break;
+ }
+ case SPACE_SEQ: {
+ const SpaceSeq *sseq = area->spacedata.first;
+ if (sseq->gizmo_flag & (SEQ_GIZMO_HIDE | SEQ_GIZMO_HIDE_TOOL)) {
+ return false;
+ }
+ break;
}
}