[Bf-blender-cvs] [068b61e5e92] blender2.8: UI: menu items for Ctrl-Tab dope sheet/graph switching

Campbell Barton noreply at git.blender.org
Thu Nov 29 09:07:45 CET 2018


Commit: 068b61e5e923f4619be927bf0a08f9afcaa78d9b
Author: Campbell Barton
Date:   Thu Nov 29 19:07:00 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB068b61e5e923f4619be927bf0a08f9afcaa78d9b

UI: menu items for Ctrl-Tab dope sheet/graph switching

Make this shortcut discoverable.

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

M	release/scripts/startup/bl_ui/space_dopesheet.py
M	release/scripts/startup/bl_ui/space_graph.py

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

diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index 5ef42dcd129..b57a0b69539 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -352,6 +352,12 @@ class DOPESHEET_MT_view(Menu):
         layout.operator("action.view_selected")
         layout.operator("action.view_frame")
 
+        # Add this to show key-binding (reverse action in dope-sheet).
+        layout.separator()
+        props = layout.operator("wm.context_set_enum", text="Toggle Graph Editor")
+        props.data_path = "area.type"
+        props.value = 'GRAPH_EDITOR'
+
         layout.separator()
         layout.menu("INFO_MT_area")
 
diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py
index d668bb7ec25..ea418f37d47 100644
--- a/release/scripts/startup/bl_ui/space_graph.py
+++ b/release/scripts/startup/bl_ui/space_graph.py
@@ -148,6 +148,12 @@ class GRAPH_MT_view(Menu):
         layout.operator("graph.view_selected")
         layout.operator("graph.view_frame")
 
+        # Add this to show key-binding (reverse action in dope-sheet).
+        layout.separator()
+        props = layout.operator("wm.context_set_enum", text="Toggle Dope Sheet")
+        props.data_path = "area.type"
+        props.value = 'DOPESHEET_EDITOR'
+
         layout.separator()
         layout.menu("INFO_MT_area")



More information about the Bf-blender-cvs mailing list