From 206aec490f5188291e41b12ba18b9826599c5a50 Mon Sep 17 00:00:00 2001 From: ChristopheSeux Date: Tue, 11 Jul 2023 16:56:35 +0200 Subject: [PATCH] fix import edit --- sequencer_utils.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sequencer_utils.py b/sequencer_utils.py index 9251803..55638c9 100644 --- a/sequencer_utils.py +++ b/sequencer_utils.py @@ -265,6 +265,12 @@ def import_edit(filepath, adapter="cmx_3600", channel='Shots', match_by='name'): strips = get_strips(channel='Shots') shot_channel = get_channel_index('Shots') + # Move all strips on an empty channel + empty_channel = max((s.channel for s in sequencer), default=0) + 1 + for s in strips: + s.channel = empty_channel + + edl = Path(filepath) try: timeline = opentimelineio.adapters.read_from_file( @@ -320,6 +326,7 @@ def import_edit(filepath, adapter="cmx_3600", channel='Shots', match_by='name'): print(f'The strip {strip.name} is updated with new range') #self.report({'INFO'}, f'The strip {strip.name} is updated with new range') + strip.channel = shot_channel strip.frame_final_start = frame_start strip.frame_final_end = frame_end