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:
authorThomas Dinges <blender@dingto.org>2009-08-16 20:15:13 +0400
committerThomas Dinges <blender@dingto.org>2009-08-16 20:15:13 +0400
commit13dcf69eee4f9ac8caa351fc2606b30c52f5eab3 (patch)
tree61ea1854d427534d9052321f1b9ade30da0a6293 /release
parent5555ef8a767de8a45c69c2b390032beb8a56479c (diff)
2.5 Timeline:
* Python conversion is nearly done, still uncommented.
Diffstat (limited to 'release')
-rw-r--r--release/ui/space_time.py56
1 files changed, 31 insertions, 25 deletions
diff --git a/release/ui/space_time.py b/release/ui/space_time.py
index 7d15a1c7250..26e55bac016 100644
--- a/release/ui/space_time.py
+++ b/release/ui/space_time.py
@@ -9,12 +9,14 @@ class TIME_HT_header(bpy.types.Header):
st = context.space_data
scene = context.scene
+ tools = context.tool_settings
+ screen = context.screen
layout.template_header()
if context.area.show_menus:
row = layout.row()
- #row.itemM("TIME_MT_view")
+ row.itemM("TIME_MT_view")
row.itemM("TIME_MT_frame")
row.itemM("TIME_MT_playback")
@@ -31,26 +33,37 @@ class TIME_HT_header(bpy.types.Header):
row.itemR(scene, "preview_range_end_frame", text="End")
layout.itemS()
- layout.itemR(scene, "current_frame")
+ layout.itemR(scene, "current_frame", text="")
layout.itemS()
-
- # XXX: Pause Button
+
row = layout.row(align=True)
row.itemO("screen.frame_jump", text="", icon='ICON_REW')
row.itemO("screen.keyframe_jump", text="", icon='ICON_PREV_KEYFRAME')
- row.item_booleanO("screen.animation_play", "reverse", True, text="", icon='ICON_PLAY_REVERSE')
- row.itemO("screen.animation_play", text="", icon='ICON_PLAY')
+ if not screen.animation_playing:
+ row.item_booleanO("screen.animation_play", "reverse", True, text="", icon='ICON_PLAY_REVERSE')
+ row.itemO("screen.animation_play", text="", icon='ICON_PLAY')
+ else:
+ sub = row.row()
+ sub.scale_x = 2.0
+ sub.itemO("screen.animation_play", text="", icon='ICON_PAUSE')
+
row.item_booleanO("screen.keyframe_jump", "next", True, text="", icon='ICON_NEXT_KEYFRAME')
row.item_booleanO("screen.frame_jump", "end", True, text="", icon='ICON_FF')
-
- layout.itemR(scene, "active_keyingset")
row = layout.row(align=True)
+ row.itemR(tools, "enable_auto_key", text="", toggle=True, icon='ICON_REC')
+ sub = row.row()
+ sub.active = tools.enable_auto_key
+ sub.itemR(tools, "autokey_mode", text="")
+
+ layout.itemS()
+
+ row = layout.row(align=True)
+ row.itemR(scene, "active_keyingset")
row.itemO("anim.insert_keyframe", text="", icon="ICON_KEY_HLT")
row.itemO("anim.delete_keyframe", text="", icon="ICON_KEY_DEHLT")
-"""
class TIME_MT_view(bpy.types.Menu):
__space_type__ = "TIMELINE"
__label__ = "View"
@@ -58,9 +71,7 @@ class TIME_MT_view(bpy.types.Menu):
def draw(self, context):
layout = self.layout
- st = context.space_data
-
-"""
+ layout.itemO("anim.time_toggle")
class TIME_MT_frame(bpy.types.Menu):
__space_type__ = "TIMELINE"
@@ -80,7 +91,6 @@ class TIME_MT_frame(bpy.types.Menu):
layout.itemO("time.start_frame_set")
layout.itemO("time.end_frame_set")
-
class TIME_MT_playback(bpy.types.Menu):
__space_type__ = "TIMELINE"
__label__ = "Playback"
@@ -89,21 +99,17 @@ class TIME_MT_playback(bpy.types.Menu):
layout = self.layout
st = context.space_data
- time = st.XXX #ToDo
-
- layout.itemR(time, "play_top_left")
- layout.itemR(time, "play_all_3d")
- layout.itemR(time, "play_anim")
- layout.itemR(time, "play_buttons")
- layout.itemR(time, "play_image")
- layout.itemR(time, "play_sequencer")
+ layout.itemR(st, "play_top_left")
+ layout.itemR(st, "play_all_3d")
+ layout.itemR(st, "play_anim")
+ layout.itemR(st, "play_buttons")
+ layout.itemR(st, "play_image")
+ layout.itemR(st, "play_sequencer")
layout.itemS()
-
- layout.itemR(time, "continue_physics")
-
+ layout.itemR(st, "continue_physics")
bpy.types.register(TIME_HT_header)
-#bpy.types.register(TIME_MT_view)
+bpy.types.register(TIME_MT_view)
bpy.types.register(TIME_MT_frame)
bpy.types.register(TIME_MT_playback)