diff options
author | Joerg Mueller <nexyon@gmail.com> | 2012-02-29 15:23:27 +0400 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2012-02-29 15:23:27 +0400 |
commit | 31cd0521ae64e95982bd4bd4f8685b7cf96d4248 (patch) | |
tree | 44161a3b57e579b70c8255ee9a55c738015bf710 /release/scripts/startup | |
parent | 33baddfc4798dffab27247ba2c3a81d19a96e199 (diff) |
Making crossfading sounds accessible in the sequencer menu.
Diffstat (limited to 'release/scripts/startup')
-rw-r--r-- | release/scripts/startup/bl_operators/sequencer.py | 16 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_sequencer.py | 3 |
2 files changed, 16 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_operators/sequencer.py b/release/scripts/startup/bl_operators/sequencer.py index c51ec74ddd6..9d055f1bef2 100644 --- a/release/scripts/startup/bl_operators/sequencer.py +++ b/release/scripts/startup/bl_operators/sequencer.py @@ -33,10 +33,20 @@ class SequencerCrossfadeSounds(Operator): @classmethod def poll(cls, context): - if context.scene and context.scene.sequence_editor and context.scene.sequence_editor.active_strip: - return context.scene.sequence_editor.active_strip.type == 'SOUND' - else: + seq1 = None + seq2 = None + for s in context.scene.sequence_editor.sequences: + if s.select and s.type == 'SOUND': + if seq1 is None: + seq1 = s + elif seq2 is None: + seq2 = s + else: + return False + if seq2 is None: return False + else: + return True def execute(self, context): seq1 = None diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 09af7af0819..723fbd2e3d4 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -264,6 +264,9 @@ class SEQUENCER_MT_strip(Menu): layout.separator() # layout.operator("sequencer.movie_change") layout.operator("sequencer.rendersize") + elif stype == 'SOUND': + layout.separator() + layout.operator("sequencer.crossfade_sounds") layout.separator() |