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:
authorJulian Eisel <eiseljulian@gmail.com>2016-09-05 17:58:40 +0300
committerJulian Eisel <eiseljulian@gmail.com>2016-09-05 18:28:41 +0300
commit718bf8fd9d17bddf500bd6b878b0ebcf0d950584 (patch)
treeec9fa2408c7fa9cfe98463945ad6bafe001c5313 /source/blender/editors/include/UI_interface.h
parent922aefba25c35be8e3696d0ebc3637d769755cae (diff)
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
Diffstat (limited to 'source/blender/editors/include/UI_interface.h')
-rw-r--r--source/blender/editors/include/UI_interface.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 49e5845e3ca..26a6fdd7d1f 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -1021,6 +1021,12 @@ void ED_keymap_ui(struct wmKeyConfig *keyconf);
void UI_drop_color_copy(struct wmDrag *drag, struct wmDropBox *drop);
int UI_drop_color_poll(struct bContext *C, struct wmDrag *drag, const struct wmEvent *event);
+/* UI_OT_space_context_cycle direction */
+enum {
+ SPACE_CONTEXT_CYCLE_PREV,
+ SPACE_CONTEXT_CYCLE_NEXT,
+};
+
bool UI_context_copy_to_selected_list(
struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop,
struct ListBase *r_lb, bool *r_use_path_from_id, char **r_path);