[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20760] branches/blender2.5/blender/ release/ui/space_sequencer.py: Edits from William, Xavier Thomas (xat) and myself

Campbell Barton ideasman42 at gmail.com
Tue Jun 9 18:19:34 CEST 2009


Revision: 20760
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20760
Author:   campbellbarton
Date:     2009-06-09 18:19:34 +0200 (Tue, 09 Jun 2009)

Log Message:
-----------
Edits from William, Xavier Thomas (xat) and myself
- strip options in the sequencer view only.
- added a view panel for non-sequencer display modes.
- button adjustments

Modified Paths:
--------------
    branches/blender2.5/blender/release/ui/space_sequencer.py

Modified: branches/blender2.5/blender/release/ui/space_sequencer.py
===================================================================
--- branches/blender2.5/blender/release/ui/space_sequencer.py	2009-06-09 16:04:07 UTC (rev 20759)
+++ branches/blender2.5/blender/release/ui/space_sequencer.py	2009-06-09 16:19:34 UTC (rev 20760)
@@ -34,10 +34,6 @@
 				row.itemO("SEQUENCER_OT_reload")
 			else:
 				row.itemR(st, "display_channel") # text="Chan"
-				layout.itemS()
-				row.itemR(st, "draw_overexposed") # text="Zebra"
-				layout.itemS()
-				row.itemR(st, "draw_safe_margin")
 
 class SEQUENCER_MT_view(bpy.types.Menu):
 	__space_type__ = "SEQUENCE_EDITOR"
@@ -251,8 +247,15 @@
 	__region_type__ = "UI"
 
 	def poll(self, context):
-		return act_strip(context) != None
+		return context.space_data.display_mode == 'SEQUENCER' and act_strip(context) != None
+		
+class SequencerButtonsPanel_Output(bpy.types.Panel):
+	__space_type__ = "SEQUENCE_EDITOR"
+	__region_type__ = "UI"
 
+	def poll(self, context):
+		return context.space_data.display_mode != 'SEQUENCER'
+
 class SEQUENCER_PT_edit(SequencerButtonsPanel):
 	__label__ = "Edit Strip"
 	__idname__ = "SEQUENCER_PT_edit"
@@ -264,28 +267,33 @@
 		
 		layout.itemR(strip, "name")
 		
+		layout.itemR(strip, "type")
+		
 		layout.itemR(strip, "blend_mode")
 		
-		layout.itemR(strip, "blend_opacity")
+		layout.itemR(strip, "blend_opacity", text="Opacity", slider=True)
 		
-		row = layout.row()
-		row.itemR(strip, "mute")
-		row.itemR(strip, "lock")
-		row.itemR(strip, "frame_locked")
+		split = layout.split()
 		
-		row = layout.row()
-		row.itemR(strip, "channel")
-		row.itemR(strip, "start_frame")
+		col = split.column()
+		col.itemR(strip, "mute")
+		col.itemR(strip, "lock")
+		col.itemR(strip, "frame_locked")
 		
-		row = layout.row()
-		row.itemR(strip, "length")
-		row.itemR(strip, "type")
+		col = split.column()
+		col.itemR(strip, "channel")
+		col.itemR(strip, "start_frame")
+		col.itemR(strip, "length")
 		
+		
 class SEQUENCER_PT_effect(SequencerButtonsPanel):
 	__label__ = "Effect Strip"
 	__idname__ = "SEQUENCER_PT_effect"
 
 	def poll(self, context):
+		if context.space_data.display_mode != 'SEQUENCER':
+			return False
+		
 		strip = act_strip(context)
 		if not strip:
 			return False
@@ -376,6 +384,9 @@
 	__idname__ = "SEQUENCER_PT_input"
 	
 	def poll(self, context):
+		if context.space_data.display_mode != 'SEQUENCER':
+			return False
+		
 		strip = act_strip(context)
 		if not strip:
 			return False
@@ -387,10 +398,18 @@
 		
 		strip = act_strip(context)
 		
-		layout.itemR(strip, "directory")
+		split = layout.split(percentage=0.3)
+		sub = split.column()
+		sub.itemL(text="Directory:")
+		sub = split.column() 
+		sub.itemR(strip, "directory", text="")
 		
 		# TODO - get current element!
-		layout.itemR(strip.elements[0], "filename")
+		split = layout.split(percentage=0.3)
+		sub = split.column()
+		sub.itemL(text="File Name:")
+		sub = split.column() 
+		sub.itemR(strip.elements[0], "filename", text="")
 		
 		"""
 		layout.itemR(strip, "use_crop")
@@ -408,6 +427,9 @@
 	__idname__ = "SEQUENCER_PT_filter"
 	
 	def poll(self, context):
+		if context.space_data.display_mode != 'SEQUENCER':
+			return False
+		
 		strip = act_strip(context)
 		if not strip:
 			return False
@@ -419,19 +441,20 @@
 		
 		strip = act_strip(context)
 		
-		row = layout.row()
-		row.itemR(strip, "premultiply")
-		row.itemR(strip, "convert_float")
-		row.itemR(strip, "de_interlace")
+		split = layout.split()
 		
-		row = layout.row()
-		row.itemR(strip, "flip_x")
-		row.itemR(strip, "flip_y")
-		row.itemR(strip, "reverse_frames")
+		col = split.column()
+		col.itemR(strip, "premultiply")
+		col.itemR(strip, "convert_float")
+		col.itemR(strip, "de_interlace")
+		col.itemR(strip, "multiply_colors")
+		col.itemR(strip, "strobe")
 		
-		row = layout.row()
-		row.itemR(strip, "multiply_colors")
-		row.itemR(strip, "strobe")
+		col = split.column()
+		col.itemL(text="Flip:")
+		col.itemR(strip, "flip_x", text="X")
+		col.itemR(strip, "flip_y", text="Y")
+		col.itemR(strip, "reverse_frames", text="Backwards")
 		
 		layout.itemR(strip, "use_color_balance")
 
@@ -440,6 +463,9 @@
 	__idname__ = "SEQUENCER_PT_proxy"
 	
 	def poll(self, context):
+		if context.space_data.display_mode != 'SEQUENCER':
+			return False
+		
 		strip = act_strip(context)
 		if not strip:
 			return False
@@ -465,7 +491,21 @@
 			row.itemR(strip.proxy, "file")
 
 
-bpy.types.register(SEQUENCER_HT_header)
+class SEQUENCER_PT_view(SequencerButtonsPanel_Output):
+	__label__ = "View Settings"
+	__idname__ = "SEQUENCER_PT_view"
+
+	def draw(self, context):
+		st = context.space_data
+
+		layout = self.layout
+
+		flow = layout.column_flow()
+		flow.itemR(st, "draw_overexposed") # text="Zebra"
+		flow.itemR(st, "draw_safe_margin")
+
+
+bpy.types.register(SEQUENCER_HT_header) # header/menu classes
 bpy.types.register(SEQUENCER_MT_view)
 bpy.types.register(SEQUENCER_MT_select)
 bpy.types.register(SEQUENCER_MT_marker)
@@ -473,9 +513,11 @@
 bpy.types.register(SEQUENCER_MT_add_effect)
 bpy.types.register(SEQUENCER_MT_strip)
 
-bpy.types.register(SEQUENCER_PT_edit)
+bpy.types.register(SEQUENCER_PT_edit) # sequencer panels
 bpy.types.register(SEQUENCER_PT_effect)
 bpy.types.register(SEQUENCER_PT_input)
 bpy.types.register(SEQUENCER_PT_filter)
 bpy.types.register(SEQUENCER_PT_proxy)
 
+bpy.types.register(SEQUENCER_PT_view) # view panels
+





More information about the Bf-blender-cvs mailing list