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?

up vote 0 down vote accepted
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.

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.

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