Merging r39312 through r39329 from trunk into soc-2011-tomato
[blender.git] / release / scripts / startup / bl_ui / space_sequencer.py
index 695e520..9ec714e 100644 (file)
@@ -18,6 +18,7 @@
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Header, Menu, Panel
 
 
 def act_strip(context):
@@ -27,7 +28,7 @@ def act_strip(context):
         return None
 
 
-class SEQUENCER_HT_header(bpy.types.Header):
+class SEQUENCER_HT_header(Header):
     bl_space_type = 'SEQUENCE_EDITOR'
 
     def draw(self, context):
@@ -77,7 +78,7 @@ class SEQUENCER_HT_header(bpy.types.Header):
                     row.prop(ed, "overlay_lock", text="", icon='LOCKED')
 
 
-class SEQUENCER_MT_view_toggle(bpy.types.Menu):
+class SEQUENCER_MT_view_toggle(Menu):
     bl_label = "View Type"
 
     def draw(self, context):
@@ -88,7 +89,7 @@ class SEQUENCER_MT_view_toggle(bpy.types.Menu):
         layout.operator("sequencer.view_toggle").type = 'SEQUENCER_PREVIEW'
 
 
-class SEQUENCER_MT_view(bpy.types.Menu):
+class SEQUENCER_MT_view(Menu):
     bl_label = "View"
 
     def draw(self, context):
@@ -130,7 +131,7 @@ class SEQUENCER_MT_view(bpy.types.Menu):
         layout.operator("screen.screen_full_area")
 
 
-class SEQUENCER_MT_select(bpy.types.Menu):
+class SEQUENCER_MT_select(Menu):
     bl_label = "Select"
 
     def draw(self, context):
@@ -149,7 +150,7 @@ class SEQUENCER_MT_select(bpy.types.Menu):
         layout.operator("sequencer.select_inverse")
 
 
-class SEQUENCER_MT_marker(bpy.types.Menu):
+class SEQUENCER_MT_marker(Menu):
     bl_label = "Marker"
 
     def draw(self, context):
@@ -170,7 +171,20 @@ class SEQUENCER_MT_marker(bpy.types.Menu):
         #layout.operator("sequencer.sound_strip_add", text="Transform Markers") # toggle, will be rna - (sseq->flag & SEQ_MARKER_TRANS)
 
 
-class SEQUENCER_MT_add(bpy.types.Menu):
+class SEQUENCER_MT_change(Menu):
+    bl_label = "Change"
+
+    def draw(self, context):
+        layout = self.layout
+
+        layout.operator_context = 'INVOKE_REGION_WIN'
+
+        layout.operator_menu_enum("sequencer.change_effect_input", "swap")
+        layout.operator_menu_enum("sequencer.change_effect_type", "type")
+        layout.operator("sequencer.change_path", text="Path/Files")
+
+
+class SEQUENCER_MT_add(Menu):
     bl_label = "Add"
 
     def draw(self, context):
@@ -191,7 +205,7 @@ class SEQUENCER_MT_add(bpy.types.Menu):
         layout.menu("SEQUENCER_MT_add_effect")
 
 
-class SEQUENCER_MT_add_effect(bpy.types.Menu):
+class SEQUENCER_MT_add_effect(Menu):
     bl_label = "Effect Strip..."
 
     def draw(self, context):
@@ -217,7 +231,7 @@ class SEQUENCER_MT_add_effect(bpy.types.Menu):
         layout.operator("sequencer.effect_strip_add", text="Adjustment Layer").type = 'ADJUSTMENT'
 
 
-class SEQUENCER_MT_strip(bpy.types.Menu):
+class SEQUENCER_MT_strip(Menu):
     bl_label = "Strip"
 
     def draw(self, context):
@@ -294,6 +308,7 @@ class SEQUENCER_MT_strip(bpy.types.Menu):
         layout.separator()
 
         layout.operator("sequencer.swap_data")
+        layout.menu("SEQUENCER_MT_change")
 
 
 class SequencerButtonsPanel():
@@ -322,7 +337,7 @@ class SequencerButtonsPanel_Output():
         return cls.has_preview(context)
 
 
-class SEQUENCER_PT_edit(SequencerButtonsPanel, bpy.types.Panel):
+class SEQUENCER_PT_edit(SequencerButtonsPanel, Panel):
     bl_label = "Edit Strip"
 
     def draw(self, context):
@@ -378,7 +393,7 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel, bpy.types.Panel):
             col.label(text="Orig Dim: %dx%d" % (elem.orig_width, elem.orig_height))
 
 
-class SEQUENCER_PT_effect(SequencerButtonsPanel, bpy.types.Panel):
+class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
     bl_label = "Effect Strip"
 
     @classmethod
@@ -516,7 +531,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, bpy.types.Panel):
         col.prop(strip, "rotation_start", text="Rotation")
 
 
-class SEQUENCER_PT_input(SequencerButtonsPanel, bpy.types.Panel):
+class SEQUENCER_PT_input(SequencerButtonsPanel, Panel):
     bl_label = "Strip Input"
 
     @classmethod
@@ -597,7 +612,7 @@ class SEQUENCER_PT_input(SequencerButtonsPanel, bpy.types.Panel):
         col.prop(strip, "frame_offset_end", text="End")
 
 
-class SEQUENCER_PT_sound(SequencerButtonsPanel, bpy.types.Panel):
+class SEQUENCER_PT_sound(SequencerButtonsPanel, Panel):
     bl_label = "Sound"
 
     @classmethod
@@ -638,7 +653,7 @@ class SEQUENCER_PT_sound(SequencerButtonsPanel, bpy.types.Panel):
         col.prop(strip, "animation_offset_end", text="End")
 
 
-class SEQUENCER_PT_scene(SequencerButtonsPanel, bpy.types.Panel):
+class SEQUENCER_PT_scene(SequencerButtonsPanel, Panel):
     bl_label = "Scene"
 
     @classmethod
@@ -672,7 +687,7 @@ class SEQUENCER_PT_scene(SequencerButtonsPanel, bpy.types.Panel):
             layout.label(text="Original frame range: %d-%d (%d)" % (sta, end, end - sta + 1))
 
 
-class SEQUENCER_PT_filter(SequencerButtonsPanel, bpy.types.Panel):
+class SEQUENCER_PT_filter(SequencerButtonsPanel, Panel):
     bl_label = "Filter"
 
     @classmethod
@@ -734,7 +749,7 @@ class SEQUENCER_PT_filter(SequencerButtonsPanel, bpy.types.Panel):
             col.prop(strip.color_balance, "invert_gain", text="Inverse")
 
 
-class SEQUENCER_PT_proxy(SequencerButtonsPanel, bpy.types.Panel):
+class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel):
     bl_label = "Proxy / Timecode"
 
     @classmethod
@@ -784,8 +799,7 @@ class SEQUENCER_PT_proxy(SequencerButtonsPanel, bpy.types.Panel):
                 col.prop(strip.proxy, "timecode")
 
 
-
-class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, bpy.types.Panel):
+class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, Panel):
     bl_label = "Scene Preview/Render"
     bl_space_type = 'SEQUENCE_EDITOR'
     bl_region_type = 'UI'
@@ -810,7 +824,7 @@ class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, bpy.types.Panel):
         '''
 
 
-class SEQUENCER_PT_view(SequencerButtonsPanel_Output, bpy.types.Panel):
+class SEQUENCER_PT_view(SequencerButtonsPanel_Output, Panel):
     bl_label = "View Settings"
 
     def draw(self, context):