[Bf-blender-cvs] [1ac0b4e2baa] blender2.8: Timeline Header Cleanup - Part 2: Rearrange buttons (WIP)

Joshua Leung noreply at git.blender.org
Thu May 10 19:28:45 CEST 2018


Commit: 1ac0b4e2baa0a77f724d60466c61d46c9e6b704d
Author: Joshua Leung
Date:   Thu May 10 19:04:14 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB1ac0b4e2baa0a77f724d60466c61d46c9e6b704d

Timeline Header Cleanup - Part 2: Rearrange buttons  (WIP)

NOTE: This is all still heavily WIP, and still requires some additional
layout engine magic to make it all nice.

* Moved current frame, and start/end frame buttons to the end
* Put playback controls in the center
* Remove other more obscure buttons (e.g. Frame menu, lock frame to frame range)

More to follow in next commit...

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

M	release/scripts/startup/bl_ui/space_time.py

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

diff --git a/release/scripts/startup/bl_ui/space_time.py b/release/scripts/startup/bl_ui/space_time.py
index 03e01be2b83..e6777dfd706 100644
--- a/release/scripts/startup/bl_ui/space_time.py
+++ b/release/scripts/startup/bl_ui/space_time.py
@@ -36,26 +36,17 @@ class TIME_HT_editor_buttons(Header):
         toolsettings = context.tool_settings
         screen = context.screen
 
-        row = layout.row(align=True)
-        row.prop(scene, "use_preview_range", text="", toggle=True)
-        row.prop(scene, "lock_frame_selection_to_range", text="", toggle=True)
-
-        row = layout.row(align=True)
-        if not scene.use_preview_range:
-            row.prop(scene, "frame_start", text="Start")
-            row.prop(scene, "frame_end", text="End")
-        else:
-            row.prop(scene, "frame_preview_start", text="Start")
-            row.prop(scene, "frame_preview_end", text="End")
-
-        if scene.show_subframe:
-            layout.prop(scene, "frame_float", text="")
-        else:
-            layout.prop(scene, "frame_current", text="")
-
+        layout.separator()   # XXX: This should be dynamic (e.g. layout.separator(stretch=1.0))
+        layout.separator()
+        layout.separator()
+        layout.separator()
+        layout.separator()
+        layout.separator()
         layout.separator()
 
         row = layout.row(align=True)
+        row.prop(toolsettings, "use_keyframe_insert_auto", text="", toggle=True)
+
         row.operator("screen.frame_jump", text="", icon='REW').end = False
         row.operator("screen.keyframe_jump", text="", icon='PREV_KEYFRAME').next = False
         if not screen.is_animation_playing:
@@ -76,10 +67,35 @@ class TIME_HT_editor_buttons(Header):
         row.operator("screen.keyframe_jump", text="", icon='NEXT_KEYFRAME').next = True
         row.operator("screen.frame_jump", text="", icon='FF').end = True
 
+        layout.separator()  # XXX: This should be dynamic (e.g. layout.separator(stretch=1.0))
+        layout.separator()
+        layout.separator()
+        layout.separator()
+        layout.separator()
+        layout.separator()
+        layout.separator()
+
+        row = layout.row()
+        row.scale_x = 0.95
+        if scene.show_subframe:
+            row.prop(scene, "frame_float", text="")
+        else:
+            row.prop(scene, "frame_current", text="")
+
+        layout.separator()
         layout.separator()
 
         row = layout.row(align=True)
-        row.prop(toolsettings, "use_keyframe_insert_auto", text="", toggle=True)
+        row.prop(scene, "use_preview_range", text="", toggle=True)
+        #row.prop(scene, "lock_frame_selection_to_range", text="", toggle=True)
+        sub = row.row(align=True)
+        sub.scale_x = 0.8
+        if not scene.use_preview_range:
+            sub.prop(scene, "frame_start", text="Start")
+            sub.prop(scene, "frame_end", text="End")
+        else:
+            sub.prop(scene, "frame_preview_start", text="Start")
+            sub.prop(scene, "frame_preview_end", text="End")
 
 
 class TIME_MT_editor_menus(Menu):
@@ -93,7 +109,6 @@ class TIME_MT_editor_menus(Menu):
     def draw_menus(layout, context):
         layout.menu("TIME_MT_view")
         layout.menu("TIME_MT_marker")
-        layout.menu("TIME_MT_frame")
         layout.menu("TIME_MT_playback")



More information about the Bf-blender-cvs mailing list