diff options
author | Jörg Müller <nexyon@gmail.com> | 2021-08-19 23:21:22 +0300 |
---|---|---|
committer | Jörg Müller <nexyon@gmail.com> | 2021-09-08 22:18:08 +0300 |
commit | 8f785524ae6309c2bb949537b33146d67d69a149 (patch) | |
tree | c025864341280fa7fe066a9f72864729e8415b8a /release/scripts | |
parent | 5bfc3a342170f961a5474687434e57b69b5ece2d (diff) |
VSE: Adding a panning angle for multichannel audio.
The panning angle allows a more intuitive panning when the output is
surround sound. It sets the angle on the horizontal plane around the
listener. 0 degrees is to the front, negative values go to the left and
positive ones to the right. +/-180 degrees is directly from the back.
Technical detail: the panning value is linear with the panning angle
with a factor of 90 degrees. For stereo this means that -1 is left and
+1 right, since the speakers are exactly 90 degrees to either side.
Differential Revision: https://developer.blender.org/D12275
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_ui/space_sequencer.py | 43 |
1 files changed, 31 insertions, 12 deletions
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 30115618f3d..be669b1fe86 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -1659,7 +1659,7 @@ class SEQUENCER_PT_adjust_sound(SequencerButtonsPanel, Panel): def draw(self, context): layout = self.layout - layout.use_property_split = True + layout.use_property_split = False st = context.space_data strip = context.active_sequence_strip @@ -1667,20 +1667,39 @@ class SEQUENCER_PT_adjust_sound(SequencerButtonsPanel, Panel): layout.active = not strip.mute - col = layout.column() - - col.prop(strip, "volume", text="Volume") - col.prop(strip, "pitch") - - col = layout.column() - col.prop(strip, "pan") - col.enabled = sound is not None and sound.use_mono - if sound is not None: col = layout.column() + + split = col.split(factor=0.4) + split.label(text="") + split.prop(sound, "use_mono") if st.waveform_display_type == 'DEFAULT_WAVEFORMS': - col.prop(strip, "show_waveform") - col.prop(sound, "use_mono") + split = col.split(factor=0.4) + split.label(text="") + split.prop(strip, "show_waveform") + + col = layout.column() + + split = col.split(factor=0.4) + split.alignment = 'RIGHT' + split.label(text="Volume") + split.prop(strip, "volume", text="") + + split = col.split(factor=0.4) + split.alignment = 'RIGHT' + split.label(text="Pitch") + split.prop(strip, "pitch", text="") + + split = col.split(factor=0.4) + split.alignment = 'RIGHT' + split.label(text="Pan") + audio_channels = context.scene.render.ffmpeg.audio_channels + pan_text = "" + if audio_channels != 'MONO' and audio_channels != 'STEREO': + pan_text = "%.2f°" % (strip.pan * 90) + split.prop(strip, "pan", text=pan_text) + split.enabled = sound.use_mono and audio_channels != 'MONO' + class SEQUENCER_PT_adjust_comp(SequencerButtonsPanel, Panel): |