How do I select the adjoined handle in the Sequencer with python? I believe that the code actually should do this, but it doesn't?

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()

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.