export background
This commit is contained in:
+12
-17
@@ -137,7 +137,7 @@ def get_strip_render_path(strip, template):
|
||||
|
||||
strip_data = parse(strip.name, template=project.shot_template)
|
||||
|
||||
print(strip_data)
|
||||
#print(strip_data)
|
||||
|
||||
index = int(strip_data['index'])
|
||||
|
||||
@@ -234,36 +234,31 @@ def render_strips(strips, template):
|
||||
scn.render.filepath = render_path
|
||||
'''
|
||||
|
||||
def render_strips(strips, template):
|
||||
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
|
||||
|
||||
for strip in strips:
|
||||
scn.frame_start = strip.frame_final_start
|
||||
scn.frame_end = strip.frame_final_end - 1
|
||||
scn.render.filepath = str(get_strip_render_path(strip, template))
|
||||
scn.frame_start = strip.frame_final_start
|
||||
scn.frame_end = strip.frame_final_end - 1
|
||||
scn.render.filepath = output
|
||||
|
||||
print(f'Render Strip to {scn.render.filepath}')
|
||||
bpy.ops.render.opengl(animation=True, sequencer=True)
|
||||
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'):
|
||||
opentimelineio = install_module('opentimelineio')
|
||||
|
||||
from opentimelineio.schema import (
|
||||
Clip,
|
||||
ExternalReference,
|
||||
Gap,
|
||||
ImageSequenceReference,
|
||||
Stack,
|
||||
Timeline,
|
||||
Track,
|
||||
)
|
||||
from opentimelineio.schema import Clip
|
||||
|
||||
scn = bpy.context.scene
|
||||
sequencer = scn.sequence_editor.sequences
|
||||
|
||||
Reference in New Issue
Block a user