Export sound separatly
This commit is contained in:
@@ -234,6 +234,27 @@ def render_strips(strips, template):
|
||||
scn.render.filepath = render_path
|
||||
'''
|
||||
|
||||
|
||||
def render_sound(strip, output):
|
||||
output = os.path.abspath(bpy.path.abspath(output))
|
||||
#ext = os.path.splitext(output)[1:]
|
||||
|
||||
scn = bpy.context.scene
|
||||
scene_start = scn.frame_start
|
||||
scene_end = scn.frame_end
|
||||
scene_current = scn.frame_current
|
||||
|
||||
scn.frame_start = strip.frame_final_start
|
||||
scn.frame_end = strip.frame_final_end - 1
|
||||
|
||||
print(f'Render Strip to {scn.render.filepath}')
|
||||
Path(output).parent.mkdir(exist_ok=True, parents=True)
|
||||
bpy.ops.sound.mixdown(filepath=output)#, container=ext.upper()
|
||||
|
||||
scn.frame_start = scene_start
|
||||
scn.frame_end = scene_end
|
||||
scn.frame_current = scene_current
|
||||
|
||||
def render_strip(strip, output):
|
||||
output = os.path.abspath(bpy.path.abspath(output))
|
||||
|
||||
@@ -248,6 +269,7 @@ def render_strip(strip, output):
|
||||
scn.render.filepath = output
|
||||
|
||||
print(f'Render Strip to {scn.render.filepath}')
|
||||
Path(output).parent.mkdir(exist_ok=True, parents=True)
|
||||
bpy.ops.render.opengl(animation=True, sequencer=True)
|
||||
|
||||
scn.frame_start = scene_start
|
||||
|
||||
Reference in New Issue
Block a user