3
$\begingroup$

In the VSE, if I select a Meta Strip, I can toggle its 'expanded view' with Tab or by calling the bpy.ops.sequencer.meta_toggle() python operator.

How do I check whether or not a Meta Strip is currently in 'expanded' or 'collapsed view' via python?

$\endgroup$

1 Answer 1

0
$\begingroup$
import bpy

scene = bpy.context.scene
seq_editor = scene.sequence_editor

if len(seq_editor.meta_stack) > 0:
    meta_name = seq_editor.meta_stack[-1].name
    print(meta_name + ' is currently expanded')
else:
    print('All meta strips are collapsed')

See meta_stack for more information.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .