add template
This commit is contained in:
+18
-2
@@ -8,7 +8,7 @@ import bpy
|
||||
from bpy.app.handlers import persistent
|
||||
|
||||
from vse_toolbox.bl_utils import get_scene_settings, get_strip_settings
|
||||
from vse_toolbox.file_utils import install_module
|
||||
from vse_toolbox.file_utils import install_module, parse
|
||||
from vse_toolbox.constants import SOUND_SUFFIXES
|
||||
#import multiprocessing
|
||||
#from multiprocessing.pool import ThreadPool
|
||||
@@ -130,8 +130,21 @@ def set_channels():
|
||||
|
||||
def get_strip_render_path(strip, template):
|
||||
scn = bpy.context.scene
|
||||
settings = get_scene_settings()
|
||||
project = settings.active_project
|
||||
|
||||
suffix = Path(scn.render.frame_path()).suffix
|
||||
render_path = template.format(strip_name=strip.name, ext=suffix[1:])
|
||||
|
||||
strip_data = parse(strip.name, template=project.shot_template)
|
||||
|
||||
print(strip_data)
|
||||
|
||||
index = int(strip_data['index'])
|
||||
|
||||
sequence = get_strip_sequence_name(strip)
|
||||
render_path = template.format(episode=project.episode_name, sequence=sequence,
|
||||
strip=strip.name, index=index, ext=suffix[1:])
|
||||
|
||||
return Path(os.path.abspath(bpy.path.abspath(render_path)))
|
||||
|
||||
'''
|
||||
@@ -392,6 +405,9 @@ def set_active_strip(scene):
|
||||
|
||||
@persistent
|
||||
def update_text_strips(scene):
|
||||
|
||||
print("update_text_strips")
|
||||
|
||||
scn = bpy.context.scene
|
||||
if not scn.sequence_editor:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user