Render sequences
This commit is contained in:
+10
-15
@@ -7,7 +7,7 @@ import os
|
||||
import bpy
|
||||
from bpy.app.handlers import persistent
|
||||
|
||||
from vse_toolbox.bl_utils import get_scene_settings, get_strip_settings
|
||||
from vse_toolbox.bl_utils import get_scene_settings, get_strip_settings, attr_set
|
||||
from vse_toolbox.file_utils import install_module, parse
|
||||
from vse_toolbox.constants import SOUND_SUFFIXES
|
||||
#import multiprocessing
|
||||
@@ -284,24 +284,19 @@ def render_strip(strip, output):
|
||||
output = os.path.abspath(bpy.path.abspath(output))
|
||||
|
||||
scn = bpy.context.scene
|
||||
scene_start = scn.frame_start
|
||||
scene_end = scn.frame_end
|
||||
scene_current = scn.frame_current
|
||||
render_path = scn.render.filepath
|
||||
|
||||
scn.frame_start = strip.frame_final_start
|
||||
scn.frame_end = strip.frame_final_end - 1
|
||||
scn.render.filepath = output
|
||||
attributes = [
|
||||
(scn, "frame_start", strip.frame_final_start),
|
||||
(scn, "frame_end", strip.frame_final_end - 1),
|
||||
(scn, "frame_current"),
|
||||
(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)
|
||||
with attr_set(attributes):
|
||||
print(f'Render Strip to {scn.render.filepath}')
|
||||
bpy.ops.render.opengl(animation=True, sequencer=True)
|
||||
|
||||
scn.frame_start = scene_start
|
||||
scn.frame_end = scene_end
|
||||
scn.frame_current = scene_current
|
||||
scn.render.filepath = render_path
|
||||
|
||||
def import_edit(filepath, adapter="cmx_3600", channel='Shots', match_by='name'):
|
||||
opentimelineio = install_module('opentimelineio')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user