diff --git a/storypencil/synchro.py b/storypencil/synchro.py index 589491d10..699425226 100644 --- a/storypencil/synchro.py +++ b/storypencil/synchro.py @@ -812,6 +812,14 @@ class STORYPENCIL_OT_TabSwitch(Operator): bl_options = {'INTERNAL'} def execute(self, context): + # For meta strips the tab key must be processed by other operator, so + # just pass through to the next operator in the stack. + if context.active_sequence_strip and context.active_sequence_strip.type == 'META': + return {'PASS_THROUGH'} + + if context.scene.sequence_editor and context.scene.sequence_editor.meta_stack: + return {'PASS_THROUGH'} + if context.scene.storypencil_use_new_window: bpy.ops.storypencil.sync_set_main('INVOKE_DEFAULT', True) else: @@ -821,15 +829,7 @@ class STORYPENCIL_OT_TabSwitch(Operator): # Get strip under time cursor strip, old_frame = get_sequence_at_frame( scene.frame_current, sequences=sequences) - # For meta strips the tab key must be processed by other operator, so - # just pass through to the next operator in the stack. - if strip is None or strip.type != 'SCENE': - if context.active_sequence_strip and context.active_sequence_strip.type == 'META': - return {'PASS_THROUGH'} - - if context.scene.sequence_editor and context.scene.sequence_editor.meta_stack: - return {'PASS_THROUGH'} - else: + if strip and strip.type == 'SCENE': bpy.ops.storypencil.switch('INVOKE_DEFAULT', True) return {'FINISHED'}