[Bf-extensions-cvs] [44d22696] master: Storypencil: Fix unreported error with META strips
Antonio Vazquez
noreply at git.blender.org
Tue Jan 24 17:32:46 CET 2023
Commit: 44d226961643fec7ce8c96bdb714fa3434302a14
Author: Antonio Vazquez
Date: Tue Jan 24 17:32:15 2023 +0100
Branches: master
https://developer.blender.org/rBA44d226961643fec7ce8c96bdb714fa3434302a14
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.
===================================================================
M storypencil/synchro.py
===================================================================
diff --git a/storypencil/synchro.py b/storypencil/synchro.py
index 8c16171c..99f95881 100644
--- a/storypencil/synchro.py
+++ b/storypencil/synchro.py
@@ -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'}
More information about the Bf-extensions-cvs
mailing list