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:
Diffstat (limited to 'release/scripts/startup/bl_ui/space_dopesheet.py')
-rw-r--r--release/scripts/startup/bl_ui/space_dopesheet.py29
1 files changed, 26 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index 371ab088190..1b8582ba8f2 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -20,6 +20,7 @@
import bpy
from bpy.types import Header, Menu
+from .space_time import *
#######################################
@@ -114,14 +115,35 @@ class DOPESHEET_HT_header(Header):
layout = self.layout
st = context.space_data
- toolsettings = context.tool_settings
row = layout.row(align=True)
row.template_header()
+
+ # XXX: perhaps our mode menu can be retired eventually when we get editor submodes in the main menu?
+ layout.prop(st, "mode", text="")
- DOPESHEET_MT_editor_menus.draw_collapsible(context, layout)
+ if st.mode == 'TIMELINE':
+ TIME_MT_editor_menus.draw_collapsible(context, layout)
+ TIME_HT_editor_buttons.draw_header(context, layout)
+ else:
+ DOPESHEET_MT_editor_menus.draw_collapsible(context, layout)
+ DOPESHEET_HT_editor_buttons.draw_header(context, layout)
- layout.prop(st, "mode", text="")
+
+# Header for "normal" dopesheet editor modes (e.g. Dope Sheet, Action, Shape Keys, etc.)
+# XXX: Temporary, until we have editor submodes in the actual editors menu
+class DOPESHEET_HT_editor_buttons(Header):
+ bl_idname = "DOPESHEET_HT_editor_buttons"
+ bl_space_type = 'DOPESHEET_EDITOR'
+ bl_label = ""
+
+ def draw(self, context):
+ pass
+
+ @staticmethod
+ def draw_header(context, layout):
+ st = context.space_data
+ toolsettings = context.tool_settings
if st.mode in {'ACTION', 'SHAPEKEY'}:
row = layout.row(align=True)
@@ -451,6 +473,7 @@ class DOPESHEET_MT_delete(Menu):
classes = (
DOPESHEET_HT_header,
+ DOPESHEET_HT_editor_buttons,
DOPESHEET_MT_editor_menus,
DOPESHEET_MT_view,
DOPESHEET_MT_select,