Select adjoined handle in Sequencer with python?

by tintwotin   Last Updated December 06, 2018 14:15 PM

How do I select the adjoined handle in the Sequencer with python?

enter image description here

import bpy

class SequencerSelectAdjoinedLeft(bpy.types.Operator):
    """Select Adjoined Left"""

    bl_idname = "sequencer.select_adjoined_left"
    bl_label = "Select Adjoined Left"
    bl_options = {'REGISTER', 'UNDO'}

    @classmethod
    def poll(cls, context):
        return bpy.context.scene is not None

    def execute(self, context):

        selection = context.selected_sequences

        if not selection:
            return {'CANCELLED'}  

        for s in selection:    
            bpy.ops.sequencer.select_all(action='DESELECT') 
            s.select = True
            context.scene.sequence_editor.active_strip = s 
            bpy.ops.sequencer.select_handles(side='LEFT')
            bpy.ops.sequencer.select(extend=True, linked_handle=True, left_right='NONE', linked_time=False)

        return {'FINISHED'}


def register():
    bpy.utils.register_class(SequencerSelectAdjoinedLeft)


def unregister():
    bpy.utils.unregister_class(SequencerSelectAdjoinedLeft)


if __name__ == "__main__":
    register()


Related Questions



Pull clip info from crossfades/fades via python

Updated March 24, 2017 14:15 PM

How to get a MovieClipSequence Clip File via Python

Updated February 21, 2016 01:06 AM


How to get the current active VSE channel?

Updated December 04, 2017 17:15 PM