From 633d96b4eb3d7a590ef8303e20ca3220f1770774 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Mon, 20 Feb 2023 11:47:49 +0100 Subject: [PATCH] Storypencil: If Meta is selected allows TAB If the strip selected is a Meta Strip always use the default open group operator. The switch to scene at frame only works if the active strip is not a meta strip. --- storypencil/synchro.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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'} -- 2.30.2