Export Csv

This commit is contained in:
Christophe SEUX
2023-04-21 21:44:05 +02:00
parent 299c240385
commit 02785f9ec0
5 changed files with 363 additions and 113 deletions
+8 -2
View File
@@ -2,6 +2,7 @@
import re
from pathlib import Path
import os
import bpy
from bpy.app.handlers import persistent
@@ -125,12 +126,15 @@ def set_channels():
def get_strip_render_path(strip, template):
scn = bpy.context.scene
return template.format(strip_name=strip.name, ext=Path(scn.render.frame_path()).suffix)
suffix = Path(scn.render.frame_path()).suffix
render_path = template.format(strip_name=strip.name, ext=suffix[1:])
return Path(os.path.abspath(bpy.path.abspath(render_path)))
def render_strips(strips, template):
scn = bpy.context.scene
scene_start = scn.frame_start
scene_end = scn.frame_end
render_path = scn.render.filepath
for strip in strips:
#print(render_template, strip.name, path)
@@ -140,7 +144,8 @@ def render_strips(strips, template):
## 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)
scn.render.filepath = str(get_strip_render_path(strip, template))
#print(scn.render.filepath)
print(f'Render Strip to {scn.render.filepath}')
#bpy.ops.render.render(animation=True)
@@ -149,6 +154,7 @@ def render_strips(strips, template):
scn.frame_start = scene_start
scn.frame_end = scene_end
scn.render.filepath = render_path
def import_edit(filepath, adapter="cmx_3600", clean_sequencer=False):
import opentimelineio as otio