0
$\begingroup$

How to select all strips in a channel via python, and deselect everything else?

$\endgroup$
1
$\begingroup$

Set strip.select to True if strip.channel is "active channel".

Test Script with active_channel = 1. Note I've simply set the active strip to None if it is not in the desired "active channel". Change this to suit.

import bpy

context = bpy.context
scene = context.scene

active_channel = 1

sed = scene.sequence_editor
# if active strip isn't in active_channel set to None.
if getattr(sed.active_strip, "channel", -1) != active_channel:
    sed.active_strip = None

sequences = sed.sequences_all
# select all strips in active channel
for strip in sequences:
    strip.select = strip.channel == active_channel
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.