This commit is contained in:
Christophe SEUX
2023-04-20 00:12:39 +02:00
parent 93134f25a9
commit d2caf90ea2
8 changed files with 505 additions and 142 deletions
+28 -5
View File
@@ -1,10 +1,11 @@
# SPDX-License-Identifier: GPL-2.0-or-later
import bpy
import re
from bpy.app.handlers import persistent
from pathlib import Path
import bpy
from bpy.app.handlers import persistent
from vse_toolbox.bl_utils import get_scene_settings, get_strip_settings
from vse_toolbox.constants import SOUND_SUFFIXES
@@ -122,9 +123,31 @@ def set_channels():
for i, c in enumerate(items.keys(), start=1):
scn.sequence_editor.channels[i].name = c.title()
def render_strips(strips):
def get_strip_render_path(strip, template):
return template.format(strip_name=strip.name, ext=Path(scn.render.frame_path()).suffix)
def render_strips(strips, template):
scn = bpy.context.scene
scene_start = scn.frame_start
scene_end = scn.frame_end
for strip in strips:
print(strip.name)
#print(render_template, strip.name, path)
scn.frame_start = strip.frame_final_start
scn.frame_end = strip.frame_final_end - 1
## render animatic
#strip_render_path = render_template.format(strip_name=strip.name, ext=Path(scn.render.frame_path()).suffix)
scn.render.filepath = get_strip_render_path(strip, template)
#print(scn.render.filepath)
print(f'Render Strip to {scn.render.filepath}')
#bpy.ops.render.render(animation=True)
bpy.ops.render.opengl(animation=True, sequencer=True)
scn.frame_start = scene_start
scn.frame_end = scene_end
def import_edit(filepath, adapter="cmx_3600", clean_sequencer=False):
import opentimelineio as otio