fix upload
parent
beb85721a9
commit
ba47d6c94f
|
@ -73,6 +73,8 @@ class VSETB_OT_render(Operator):
|
|||
strip_settings = strip.vsetb_strip_settings
|
||||
strip_data = {**format_data, **strip_settings.format_data}
|
||||
strip_render_path = project.render_strip_template.format(**strip_data)
|
||||
|
||||
|
||||
render_strip(strip, strip_render_path)
|
||||
|
||||
self.report({"INFO"}, f'Strips rendered in {time.perf_counter()-start_time} seconds')
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
import bpy
|
||||
|
@ -297,6 +298,8 @@ class VSETB_OT_upload_to_tracker(Operator):
|
|||
if settings.active_episode:
|
||||
episode = settings.active_episode.id
|
||||
|
||||
format_data = {**settings.format_data, **project.format_data}
|
||||
|
||||
|
||||
tracker = prefs.tracker
|
||||
|
||||
|
@ -305,10 +308,11 @@ class VSETB_OT_upload_to_tracker(Operator):
|
|||
status = None
|
||||
|
||||
for strip in get_strips(channel='Shots', selected_only=True):
|
||||
strip_settings = strip.vsetb_strip_settings
|
||||
sequence_name = get_strip_sequence_name(strip)
|
||||
shot_name = strip.name
|
||||
sequence = tracker.get_sequence(sequence_name, episode=episode)
|
||||
metadata = strip.vsetb_strip_settings.metadata.to_dict()
|
||||
metadata = strip_settings.metadata.to_dict()
|
||||
#print(metadata)
|
||||
|
||||
if not sequence:
|
||||
|
@ -329,7 +333,10 @@ class VSETB_OT_upload_to_tracker(Operator):
|
|||
|
||||
preview = None
|
||||
if self.add_preview:
|
||||
preview = Path(get_strip_render_path(strip, project.render_template))
|
||||
|
||||
strip_data = {**format_data, **strip_settings.format_data}
|
||||
preview = project.render_strip_template.format(**strip_data)
|
||||
preview = Path(os.path.abspath(bpy.path.abspath(preview)))
|
||||
#print(preview)
|
||||
if not preview.exists():
|
||||
print(f'The preview {preview} not exists')
|
||||
|
@ -348,12 +355,12 @@ class VSETB_OT_upload_to_tracker(Operator):
|
|||
|
||||
|
||||
if self.custom_data:
|
||||
metadata = strip.vsetb_strip_settings.metadata.to_dict()
|
||||
description = strip.vsetb_strip_settings.description
|
||||
metadata = strip_settings.metadata.to_dict()
|
||||
description = strip_settings.description
|
||||
tracker.update_data(shot, metadata, frames=strip.frame_final_duration, description=description)
|
||||
|
||||
if self.casting:
|
||||
casting = [{'asset_id': a.id, 'nb_occurences': a.instance} for a in strip.vsetb_strip_settings.casting]
|
||||
casting = [{'asset_id': a.id, 'nb_occurences': a.instance} for a in strip_settings.casting]
|
||||
tracker.update_casting(shot, casting)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue