From 9047346ea0b756994533080aede1eac9d974ac44 Mon Sep 17 00:00:00 2001 From: Nathan Lovato <12694995+NathanLovato@users.noreply.github.com> Date: Sun, 24 Jul 2022 11:43:46 +0200 Subject: [PATCH] fix: error when trimming effect strips part of #461 --- operators/utils/functions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/operators/utils/functions.py b/operators/utils/functions.py index 89dfa52..6c7e796 100644 --- a/operators/utils/functions.py +++ b/operators/utils/functions.py @@ -401,8 +401,11 @@ def delete_strips(to_delete): """ Deletes the list of sequences `to_delete` """ + # Effect strips get deleted with their source so we skip them to avoid errors. + to_delete = [s for s in to_delete if s.type in SequenceTypes.CUTABLE] + sequences = bpy.context.scene.sequence_editor.sequences for s in to_delete: - bpy.context.scene.sequence_editor.sequences.remove(s) + sequences.remove(s) def move_selection(context, sequences, frame_offset, channel_offset=0):