== Sequencer ==
authorPeter Schlaile <peter@schlaile.de>
Mon, 3 May 2010 22:17:05 +0000 (22:17 +0000)
committerPeter Schlaile <peter@schlaile.de>
Mon, 3 May 2010 22:17:05 +0000 (22:17 +0000)
Added operator (and menu entry) to deinterlace all selected movie strips.
(does also walk into selected meta strips)

Also: small fix for multicam cutting tool (now works also within metas)

release/scripts/op/sequencer.py
release/scripts/ui/space_sequencer.py

index c72fa45655e837569ada01cb868681d5ae826791..a542337345c998d40870994ee03a1e33c8216e56 100644 (file)
@@ -98,19 +98,41 @@ class SequencerCutMulticam(bpy.types.Operator):
             
         cfra = context.scene.frame_current
         bpy.ops.sequencer.cut(frame=cfra,type='HARD',side='RIGHT')
-        for s in context.scene.sequence_editor.sequences:
+        for s in context.scene.sequence_editor.sequences_all:
             if s.selected and s.type == 'MULTICAM' and s.frame_final_start <= cfra and cfra < s.frame_final_end:
                 context.scene.sequence_editor.active_strip = s
                 
         context.scene.sequence_editor.active_strip.multicam_source = camera
         return {'FINISHED'}
 
+class SequencerDeinterlaceSelectedMovies(bpy.types.Operator):
+    '''Deinterlace all selected movie sources.'''
+
+    bl_idname = "sequencer.deinterlace_selected_movies"
+    bl_label = "Deinterlace Movies"
+    bl_options = {'REGISTER', 'UNDO'}
+
+    def poll(self, context):
+        if context.scene and context.scene.sequence_editor:
+            return True
+        else:
+            return False
+
+    def execute(self, context):
+        for s in context.scene.sequence_editor.sequences_all:
+            if s.selected and s.type == 'MOVIE':
+                s.de_interlace = True
+                
+        return {'FINISHED'}
+
+
 
 def register():
     register = bpy.types.register
     
     register(SequencerCrossfadeSounds)
     register(SequencerCutMulticam)
+    register(SequencerDeinterlaceSelectedMovies)
 
 
 def unregister():
@@ -118,6 +140,7 @@ def unregister():
     
     unregister(SequencerCrossfadeSounds)
     unregister(SequencerCutMulticam)
+    unregister(SequencerDeinterlaceSelectedMovies)
 
 if __name__ == "__main__":
     register()
index fad8307c401b9bd906bbf130774b7dc8e6f0f684..ca31e134e598e909f3835ac0ee9f60d7d9c5a90d 100644 (file)
@@ -236,6 +236,7 @@ class SEQUENCER_MT_strip(bpy.types.Menu):
         layout.operator("sequencer.cut", text="Cut (hard) at frame").type = 'HARD'
         layout.operator("sequencer.cut", text="Cut (soft) at frame").type = 'SOFT'
         layout.operator("sequencer.images_separate")
+        layout.operator("sequencer.deinterlace_selected_movies")
         layout.separator()
 
         layout.operator("sequencer.duplicate")