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.
This commit is contained in:
parent
329f056029
commit
44d2269616
|
@ -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'}
|
||||
|
|
Loading…
Reference in New Issue