]> git.parisson.com Git - promaster.git/commitdiff
fix fades master
authoryomguy <yomguy@parisson.com>
Wed, 19 Dec 2012 10:44:18 +0000 (11:44 +0100)
committeryomguy <yomguy@parisson.com>
Wed, 19 Dec 2012 10:44:18 +0000 (11:44 +0100)
kdenlive/fade.py

index d6b292148c452b1d1a313459b2b4d11b0bc75c4a..bc8c052818ef5a4550ce652ddd8965adef47cb51 100644 (file)
@@ -167,9 +167,6 @@ class AutoFade(object):
         return child
 
     def run(self):
         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']:
         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 producer != 'black':
                             frame_in = att['attributes']['in']
                             frame_out = att['attributes']['out']
-
                             if 'audio' in producer:
                             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 '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')
 
 
         return dicttoxml(self.session).encode('utf-8')