UI: Ctrl+Tab and Ctrl+Shift+Tab to cycle through space context "tabs"
authorJulian Eisel <eiseljulian@gmail.com>
Mon, 5 Sep 2016 14:58:40 +0000 (16:58 +0200)
committerJulian Eisel <eiseljulian@gmail.com>
Mon, 5 Sep 2016 15:28:41 +0000 (17:28 +0200)
commit718bf8fd9d17bddf500bd6b878b0ebcf0d950584
treeec9fa2408c7fa9cfe98463945ad6bafe001c5313
parent922aefba25c35be8e3696d0ebc3637d769755cae
UI: Ctrl+Tab and Ctrl+Shift+Tab to cycle through space context "tabs"

In User Preferences, Properties Editor and toolshelf, Ctrl+Tab and Ctrl+Shift+Tab now activates the next or previous space context (or category in case of toolshelf tabs), respectively.

For Properties Editor such functionality was completely missing, only toolshelf allowed cycling using ctrl+mousewheel (or only mousewheel while hovering tab region). Ctrl+Tab and Ctrl+Shift+Tab are common web browser shortcuts, so they're a reasonable choice to go with.
Reaching the first/last item doesn't cause the cycling to stop, we continue at the other end of the list then. (I didn't add this to Ctrl+Mousewheel toggling in toolshelf since I wanted to keep its behavior unchanged.)

We could get rid of (Ctrl+)Mousewheel cycling in toolshelf, but this may break user habits.

The cycling happens using a new operator, UI_OT_space_context_cycle, for toolshelf tabs it's hardcoded in panel handling code though.
Generalized rna_property_enum_step a bit and moved it to rna_access.c to allow external reuse.

Reviewed By: venomgfx
Differential Revision: https://developer.blender.org/D2189
source/blender/editors/include/UI_interface.h
source/blender/editors/interface/interface_ops.c
source/blender/editors/interface/interface_panel.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/screen/screen_ops.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/rna_access.c