[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22524] branches/blender2.5/blender: 2. 5 Timeline:

Thomas Dinges dingto at gmx.de
Sun Aug 16 18:15:13 CEST 2009


Revision: 22524
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22524
Author:   dingto
Date:     2009-08-16 18:15:13 +0200 (Sun, 16 Aug 2009)

Log Message:
-----------
2.5 Timeline:

* Python conversion is nearly done, still uncommented. 

Modified Paths:
--------------
    branches/blender2.5/blender/release/ui/space_time.py
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c

Modified: branches/blender2.5/blender/release/ui/space_time.py
===================================================================
--- branches/blender2.5/blender/release/ui/space_time.py	2009-08-16 15:46:09 UTC (rev 22523)
+++ branches/blender2.5/blender/release/ui/space_time.py	2009-08-16 16:15:13 UTC (rev 22524)
@@ -9,12 +9,14 @@
 		
 		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 @@
 			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,10 +71,8 @@
 	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"
 	__label__ = "Frame"
@@ -80,7 +91,6 @@
 		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 @@
 		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)

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c	2009-08-16 15:46:09 UTC (rev 22523)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c	2009-08-16 16:15:13 UTC (rev 22524)
@@ -30,6 +30,7 @@
 #include "rna_internal.h"
 
 #include "DNA_scene_types.h"
+#include "DNA_userdef_types.h"
 
 #ifdef WITH_FFMPEG
 #include "BKE_writeffmpeg.h"
@@ -359,6 +360,11 @@
 		{SCE_SNAP_TARGET_MEDIAN, "MEDIAN", 0, "Median", "Snap median onto target."},
 		{SCE_SNAP_TARGET_ACTIVE, "ACTIVE", 0, "Active", "Snap active onto target."},
 		{0, NULL, 0, NULL, NULL}};
+		
+	static EnumPropertyItem auto_key_items[] = {
+		{AUTOKEY_MODE_NORMAL, "ADD_REPLACE_KEYS", 0, "Add/Replace", ""},
+		{AUTOKEY_MODE_EDITKEYS, "REPLACE_KEYS", 0, "Replace", ""},
+		{0, NULL, 0, NULL, NULL}};
 
 	srna= RNA_def_struct(brna, "ToolSettings", NULL);
 	RNA_def_struct_ui_text(srna, "Tool Settings", "");
@@ -421,6 +427,16 @@
 	RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PEEL_OBJECT);
 	RNA_def_property_ui_text(prop, "Snap Peel Object", "Consider objects as whole when finding volume center.");
 	RNA_def_property_ui_icon(prop, ICON_SNAP_PEEL_OBJECT, 0);
+	
+	/* Auto Keying */
+	prop= RNA_def_property(srna, "enable_auto_key", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON);
+	RNA_def_property_ui_text(prop, "Auto Keying", "Automatic keyframe insertion for Objects and Bones");
+	
+	prop= RNA_def_property(srna, "autokey_mode", PROP_ENUM, PROP_NONE);
+	RNA_def_property_enum_sdna(prop, NULL, "autokey_mode");
+	RNA_def_property_enum_items(prop, auto_key_items);
+	RNA_def_property_ui_text(prop, "Auto-Keying Mode", "Mode of automatic keyframe insertion for Objects and Bones");
 
 	/* UV */
 	prop= RNA_def_property(srna, "uv_selection_mode", PROP_ENUM, PROP_NONE);





More information about the Bf-blender-cvs mailing list