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$
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$

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.