From: yomguy Date: Wed, 19 Dec 2012 10:44:18 +0000 (+0100) Subject: fix fades X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=HEAD;p=promaster.git fix fades --- diff --git a/kdenlive/fade.py b/kdenlive/fade.py index d6b2921..bc8c052 100644 --- a/kdenlive/fade.py +++ b/kdenlive/fade.py @@ -167,9 +167,6 @@ class AutoFade(object): return child def run(self): - audio_count = 0 - video_count = 0 - for attr in self.session['children']: if 'playlist' in attr['name'] and 'children' in attr: for att in attr['children']: @@ -178,21 +175,10 @@ class AutoFade(object): if producer != 'black': frame_in = att['attributes']['in'] frame_out = att['attributes']['out'] - if 'audio' in producer: - if not audio_count % 2: - att['children'] = [self.audio_fade_out(frame_out)] - else: - att['children'] = [self.audio_fade_in(frame_in)] - audio_count += 1 - - + att['children'] = [self.audio_fade_in(frame_in), self.audio_fade_out(frame_out)] if 'video' in producer: - if not video_count % 2: - att['children'] = [self.video_fade_out(frame_out)] - else: - att['children'] = [self.video_fade_in(frame_in)] - video_count += 1 + att['children'] = [self.video_fade_in(frame_in), self.video_fade_out(frame_out)] return dicttoxml(self.session).encode('utf-8')