Skip to content
Snippets Groups Projects
Commit 44d22696 authored by Antonio Vazquez's avatar Antonio Vazquez
Browse files

Storypencil: Fix unreported error with META strips

When pressing Tab key, if the strip active or below the
cursor is a META type, it must be processed by meta operator
not by swith operator.

Now the operator pass through the event to the next operator
in the stack.
parent 329f0560
No related branches found
No related tags found
No related merge requests found
......@@ -815,6 +815,19 @@ class STORYPENCIL_OT_TabSwitch(Operator):
if context.scene.storypencil_use_new_window:
bpy.ops.storypencil.sync_set_main('INVOKE_DEFAULT', True)
else:
bpy.ops.storypencil.switch('INVOKE_DEFAULT', True)
scene = context.scene
sequences = scene.sequence_editor.sequences
if sequences:
# Get strip under time cursor
strip, old_frame = get_sequence_at_frame(
scene.frame_current, sequences=sequences)
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:
bpy.ops.storypencil.switch('INVOKE_DEFAULT', True)
return {'FINISHED'}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment