1
$\begingroup$

I'm finishing an edit and it has lots of different audio sources. I have been a bit messy and there's layers of metastrips containig both audio and video. I need to silence all audio inside all metastrips and keep ON all audio outside metastrips..

Selecting one by one would be a literal nightmare. Is there a way to script it with python maybe? I have no practice coding in blender..

Thanks in advance.

$\endgroup$
1
  • $\begingroup$ Isn't there a possibility to change the volume for a meta strip to zero? By the way this should well be possible in python. I might look into it tomorrow. $\endgroup$
    – Samoth
    Nov 10, 2016 at 0:29

1 Answer 1

3
$\begingroup$

This selects all sound strips in meta strips and mutes them

import bpy
context = bpy.context
scene = context.scene
se = scene.sequence_editor
sounds_in_meta_strips = [s for ms in se.sequences_all if ms.type == 'META'
               for s in ms.sequences if s.type == 'SOUND']

for s in sounds_in_meta_strips:
    # mute the sound
    s.mute = True

Extended to append a toggle button to the Sequencer Header.

enter image description here

import bpy
from bpy.props import BoolProperty

def mute(self, context):
    se = self.sequence_editor
    sounds_in_meta_strips = [s for ms in se.sequences_all if ms.type == 'META'
               for s in ms.sequences if s.type == 'SOUND']

    for s in sounds_in_meta_strips:
        # mute the sound
        s.mute = self.mute_meta_strips

def draw_button(self, context):
    scene = context.scene
    layout = self.layout
    layout.prop(scene, "mute_meta_strips", toggle=True)

bpy.types.Scene.mute_meta_strips = BoolProperty(name="Mute Sounds in Metas", default=False, update=mute)
bpy.types.SEQUENCER_HT_header.append(draw_button)
$\endgroup$
1
  • $\begingroup$ That worked perfectly. i think i'll have to start scripting in blender.....many thanks $\endgroup$
    – lucanapo
    Nov 10, 2016 at 11:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .