[Bf-blender-cvs] [70582cf8d26] blender2.8: UI: Support using Ctrl+Scrollwheel to cycle properties editor tabs

Julian Eisel noreply at git.blender.org
Mon Oct 29 23:32:25 CET 2018


Commit: 70582cf8d26e4ba5d6ccb0d1044d16e239fa655e
Author: Julian Eisel
Date:   Mon Oct 29 23:28:08 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB70582cf8d26e4ba5d6ccb0d1044d16e239fa655e

UI: Support using Ctrl+Scrollwheel to cycle properties editor tabs

Small side effect is that area operators (toggle fullscreen/maximized, duplicate
area) are now displayed in RMB-menu. Makes sense anyway.

===================================================================

M	release/scripts/addons
M	release/scripts/addons_contrib
M	source/blender/editors/include/ED_screen.h
M	source/blender/editors/screen/screen_ops.c
M	source/blender/editors/space_buttons/space_buttons.c
M	source/tools

===================================================================

diff --git a/release/scripts/addons b/release/scripts/addons
index 6c3a46dc113..c2aef4a98f6 160000
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@ -1 +1 @@
-Subproject commit 6c3a46dc113de870a03191e4c0685238b0823acd
+Subproject commit c2aef4a98f6cabef9a6d38a33035f02cf8233dd0
diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib
index 15b25a42783..5c4210d5b78 160000
--- a/release/scripts/addons_contrib
+++ b/release/scripts/addons_contrib
@@ -1 +1 @@
-Subproject commit 15b25a42783d1e516b5298d70b582fae2559ae17
+Subproject commit 5c4210d5b78c61137c5f32e7deb7561177ac0894
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h
index 2f2f4847a6f..faa9233bff1 100644
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@ -364,4 +364,10 @@ void ED_area_type_hud_ensure(struct bContext *C, struct ScrArea *sa);
 #define ED_KEYMAP_GPENCIL   32
 #define ED_KEYMAP_HEADER    64
 
+/* SCREEN_OT_space_context_cycle direction */
+enum {
+	SPACE_CONTEXT_CYCLE_PREV,
+	SPACE_CONTEXT_CYCLE_NEXT,
+};
+
 #endif /* __ED_SCREEN_H__ */
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 3d32f10582d..7a447bb41d4 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -4614,12 +4614,6 @@ static void SCREEN_OT_region_blend(wmOperatorType *ot)
 /** \name Space Context Cycle Operator
  * \{ */
 
-/* SCREEN_OT_space_context_cycle direction */
-enum {
-	SPACE_CONTEXT_CYCLE_PREV,
-	SPACE_CONTEXT_CYCLE_NEXT,
-};
-
 static const EnumPropertyItem space_context_cycle_direction[] = {
 	{SPACE_CONTEXT_CYCLE_PREV, "PREV", 0, "Previous", ""},
 	{SPACE_CONTEXT_CYCLE_NEXT, "NEXT", 0, "Next", ""},
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index 413d0ab376a..0e52b8ad320 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -351,8 +351,14 @@ static void buttons_operatortypes(void)
 static void buttons_keymap(struct wmKeyConfig *keyconf)
 {
 	wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Property Editor", SPACE_BUTS, 0);
+	wmKeyMapItem *kmi;
 
 	WM_keymap_add_item(keymap, "BUTTONS_OT_context_menu", RIGHTMOUSE, KM_PRESS, 0, 0);
+
+	kmi = WM_keymap_add_item(keymap, "SCREEN_OT_space_context_cycle", WHEELUPMOUSE, KM_PRESS, KM_CTRL, 0);
+	RNA_enum_set(kmi->ptr, "direction", SPACE_CONTEXT_CYCLE_PREV);
+	kmi = WM_keymap_add_item(keymap, "SCREEN_OT_space_context_cycle", WHEELDOWNMOUSE, KM_PRESS, KM_CTRL, 0);
+	RNA_enum_set(kmi->ptr, "direction", SPACE_CONTEXT_CYCLE_NEXT);
 }
 
 /* add handlers, stuff you only do once or on area/region changes */
@@ -410,7 +416,11 @@ static void buttons_header_region_message_subscribe(
 
 static void buttons_navigation_bar_region_init(wmWindowManager *wm, ARegion *ar)
 {
+	wmKeyMap *keymap = WM_keymap_ensure(wm->defaultconf, "Property Editor", SPACE_BUTS, 0);
+	WM_event_add_keymap_handler(&ar->handlers, keymap);
+
 	ar->flag |= RGN_FLAG_PREFSIZE_OR_HIDDEN;
+
 	ED_region_panels_init(wm, ar);
 	ar->v2d.keepzoom |= V2D_LOCKZOOM_X | V2D_LOCKZOOM_Y;
 }
diff --git a/source/tools b/source/tools
index 11656ebaf7f..5162393c104 160000
--- a/source/tools
+++ b/source/tools
@@ -1 +1 @@
-Subproject commit 11656ebaf7f912cdb1b5eb39c5d0a3b5d492c1aa
+Subproject commit 5162393c104d6d5f0314183a084875fff68f28bb



More information about the Bf-blender-cvs mailing list