Undo revision 23130 which was a merge with 2.5, a messy one because I did something...
[blender.git] / release / ui / space_sequencer.py
index daae4a8..1edcf32 100644 (file)
@@ -7,7 +7,7 @@ def act_strip(context):
 
 # Header
 class SEQUENCER_HT_header(bpy.types.Header):
-       __space_type__ = 'SEQUENCE_EDITOR'
+       __space_type__ = "SEQUENCE_EDITOR"
 
        def draw(self, context):
                layout = self.layout
@@ -38,7 +38,7 @@ class SEQUENCER_HT_header(bpy.types.Header):
                        layout.itemR(st, "display_channel", text="Channel")
 
 class SEQUENCER_MT_view(bpy.types.Menu):
-       __space_type__ = 'SEQUENCE_EDITOR'
+       __space_type__ = "SEQUENCE_EDITOR"
        __label__ = "View"
        
        def draw(self, context):
@@ -106,7 +106,7 @@ class SEQUENCER_MT_view(bpy.types.Menu):
                """
 
 class SEQUENCER_MT_select(bpy.types.Menu):
-       __space_type__ = 'SEQUENCE_EDITOR'
+       __space_type__ = "SEQUENCE_EDITOR"
        __label__ = "Select"
 
        def draw(self, context):
@@ -127,7 +127,7 @@ class SEQUENCER_MT_select(bpy.types.Menu):
                layout.itemO("sequencer.select_inverse")
 
 class SEQUENCER_MT_marker(bpy.types.Menu):
-       __space_type__ = 'SEQUENCE_EDITOR'
+       __space_type__ = "SEQUENCE_EDITOR"
        __label__ = "Marker (TODO)"
 
        def draw(self, context):
@@ -146,7 +146,7 @@ class SEQUENCER_MT_marker(bpy.types.Menu):
                #layout.itemO("sequencer.sound_strip_add", text="Transform Markers") # toggle, will be rna - (sseq->flag & SEQ_MARKER_TRANS)
 
 class SEQUENCER_MT_add(bpy.types.Menu):
-       __space_type__ = 'SEQUENCE_EDITOR'
+       __space_type__ = "SEQUENCE_EDITOR"
        __label__ = "Add"
 
        def draw(self, context):
@@ -163,7 +163,7 @@ class SEQUENCER_MT_add(bpy.types.Menu):
                layout.itemM("SEQUENCER_MT_add_effect")
 
 class SEQUENCER_MT_add_effect(bpy.types.Menu):
-       __space_type__ = 'SEQUENCE_EDITOR'
+       __space_type__ = "SEQUENCE_EDITOR"
        __label__ = "Effect Strip..."
 
        def draw(self, context):
@@ -187,7 +187,7 @@ class SEQUENCER_MT_add_effect(bpy.types.Menu):
                layout.item_enumO("sequencer.effect_strip_add", 'type', 'SPEED')
 
 class SEQUENCER_MT_strip(bpy.types.Menu):
-       __space_type__ = 'SEQUENCE_EDITOR'
+       __space_type__ = "SEQUENCE_EDITOR"
        __label__ = "Strip"
 
        def draw(self, context):
@@ -254,15 +254,15 @@ class SEQUENCER_MT_strip(bpy.types.Menu):
 
 # Panels
 class SequencerButtonsPanel(bpy.types.Panel):
-       __space_type__ = 'SEQUENCE_EDITOR'
-       __region_type__ = 'UI'
+       __space_type__ = "SEQUENCE_EDITOR"
+       __region_type__ = "UI"
 
        def poll(self, context):
                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'
+       __space_type__ = "SEQUENCE_EDITOR"
+       __region_type__ = "UI"
 
        def poll(self, context):
                return context.space_data.display_mode != 'SEQUENCER'
@@ -303,7 +303,6 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel):
                row.itemR(strip, "frame_locked", text="Frame Lock")
                
                col = layout.column()
-               col.enabled = not strip.lock    
                col.itemR(strip, "channel")
                col.itemR(strip, "start_frame")
                col.itemR(strip, "length")
@@ -416,28 +415,23 @@ class SEQUENCER_PT_input(SequencerButtonsPanel):
                if not strip:
                        return False
                
-               return strip.type in ('MOVIE', 'IMAGE')
+               return strip.type in ('MOVIE', 'IMAGE', 'SOUND')
        
        def draw(self, context):
                layout = self.layout
                
                strip = act_strip(context)
                
-               split = layout.split(percentage=0.2)
-               col = split.column()
-               col.itemL(text="Path:")
-               col = split.column()
-               col.itemR(strip, "directory", text="")
+               layout.itemR(strip, "directory", text="")
                
                # Current element for the filename
-               
+               split = layout.split(percentage=0.3)
+               col = split.column()
+               col.itemL(text="File Name:")
+               col = split.column()
                
                elem = strip.getStripElem(context.scene.current_frame)
                if elem:
-                       split = layout.split(percentage=0.2)
-                       col = split.column()
-                       col.itemL(text="File:")
-                       col = split.column()
                        col.itemR(elem, "filename", text="") # strip.elements[0] could be a fallback
                
                layout.itemR(strip, "use_translation", text="Image Offset:")
@@ -461,37 +455,6 @@ class SEQUENCER_PT_input(SequencerButtonsPanel):
                col.itemR(strip, "animation_start_offset", text="Start")
                col.itemR(strip, "animation_end_offset", text="End")
 
-class SEQUENCER_PT_sound(SequencerButtonsPanel):
-       __label__ = "Sound"
-       
-       def poll(self, context):
-               if context.space_data.display_mode != 'SEQUENCER':
-                       return False
-               
-               strip = act_strip(context)
-               if not strip:
-                       return False
-               
-               return strip.type in ('SOUND', )
-       
-       def draw(self, context):
-               layout = self.layout
-               
-               strip = act_strip(context)
-               
-               layout.template_ID(strip, "sound", new="sound.open")
-               
-               layout.itemS()
-               layout.itemR(strip.sound, "filename", text="")
-               
-               row = layout.row()
-               if strip.sound.packed_file:
-                       row.itemO("sound.unpack", icon='ICON_PACKAGE', text="Unpack")
-               else:
-                       row.itemO("sound.pack", icon='ICON_UGLYPACKAGE', text="Pack")
-               
-               row.itemR(strip.sound, "caching")
-
 class SEQUENCER_PT_filter(SequencerButtonsPanel):
        __label__ = "Filter"
        
@@ -595,7 +558,6 @@ bpy.types.register(SEQUENCER_MT_strip)
 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_sound)
 bpy.types.register(SEQUENCER_PT_filter)
 bpy.types.register(SEQUENCER_PT_proxy)