diff options
author | Joshua Leung <aligorith@gmail.com> | 2018-04-19 15:41:20 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2018-04-20 19:54:40 +0300 |
commit | cc06e0fbe8bf122a7f1688342f9e80df3be8502f (patch) | |
tree | 402854165c7d90874f9aac87f22e0565f12f75be /release/scripts/startup/bl_ui/space_time.py | |
parent | 73d2e6f2021e649a1bf8952c37ce870562a884e4 (diff) |
Dopesheet-Timeline: First steps towards making the Timeline a mode of the DopeSheet Editor
For many years, animators have been requesting the ability to edit keyframes in the
timeline. However, implementing such tools in the timeline quickly becomes a slippery
slope, where we'll eventually end up having to duplicate all the functionality from the
dopesheet editor.
Discussing with William and Pablo this morning, we realised that perhaps it might be possible
to just make the Timeline a mode of the Dopesheet Editor (and kill off the old standalone
Timeline), meaning that we essentially get all the Dopesheet Editor goodness for free!
Also, with some proposed UI updates (i.e. allowing "submodes" of editors to be part of the
the main editors selector), it might not even matter that there isn't an "actual" timeline
editor anymore.
This commit implements the following changes (which are actually sufficient for supporting
most basic workflows):
* Timeline mode in Dopesheet Editor
* Tweaks to UI code to make the Timeline header/menus show up in Dopesheet editor
TODO:
* Hide channels list when switching to timeline mode
* Port over cache-file indicators
* Add missing timeline-only settings that need a new home in the dopesheet
* Go through fixing all timeline editor operators (e.g. Bind to camera)
* Port over start/end frame shading (and adjust preview range rendering to make the
distinction between these clear)
* Remove old timeline editor, and transfer over any leftover code
Diffstat (limited to 'release/scripts/startup/bl_ui/space_time.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_time.py | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_ui/space_time.py b/release/scripts/startup/bl_ui/space_time.py index 9026a93aa99..669d146cb91 100644 --- a/release/scripts/startup/bl_ui/space_time.py +++ b/release/scripts/startup/bl_ui/space_time.py @@ -27,15 +27,29 @@ class TIME_HT_header(Header): def draw(self, context): layout = self.layout - scene = context.scene - toolsettings = context.tool_settings - screen = context.screen - userprefs = context.user_preferences - row = layout.row(align=True) row.template_header() TIME_MT_editor_menus.draw_collapsible(context, layout) + TIME_HT_editor_buttons.draw_header(context, layout) + + +# Header buttons for actual timeline editor header +# XXX: Temporary, until we have editor submodes in the actual editors menu +class TIME_HT_editor_buttons(Header): + bl_idname = "TIME_HT_editor_buttons" + bl_space_type = 'TIMELINE' # XXX: Change this to 'DOPESHEET_EDITOR' + bl_label = "" + + def draw(self, context): + pass + + @staticmethod + def draw_header(context, layout): + scene = context.scene + toolsettings = context.tool_settings + screen = context.screen + userprefs = context.user_preferences row = layout.row(align=True) row.prop(scene, "use_preview_range", text="", toggle=True) @@ -272,6 +286,7 @@ def marker_menu_generic(layout): classes = ( TIME_HT_header, + TIME_HT_editor_buttons, TIME_MT_editor_menus, TIME_MT_marker, TIME_MT_view, |