Storypencil: If Meta is selected allows TAB (Fix for #104912) #104426

Merged
Antonio Vazquez merged 1 commits from antoniov/blender-addons:temp-storypencil-meta into main 2023-03-12 09:29:59 +01:00
Showing only changes of commit 633d96b4eb - Show all commits

View File

@ -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'}