import casting with shots

master
florentin.luce 2024-12-03 17:22:36 +01:00
parent 8e21dcc6f5
commit c623f3e0a8
1 changed files with 17 additions and 0 deletions

View File

@ -430,6 +430,21 @@ class VSETB_OT_import_shots(Operator):
if last_preview := find_last(template, **format_data):
return last_preview
def import_casting(self, shot, strip):
prefs = get_addon_prefs()
tracker = prefs.tracker
strip_settings = strip.vsetb_strip_settings
casting_data = tracker.get_casting(shot)
for asset_data in casting_data:
item = strip_settings.casting.add()
item.name = asset_data['asset_name']
item.id = asset_data['asset_id']
item['_name'] = asset_data['asset_name']
strip_settings.casting.update()
def execute(self, context):
scn = context.scene
settings = get_scene_settings()
@ -467,6 +482,8 @@ class VSETB_OT_import_shots(Operator):
strip.blend_alpha = 0
strip.color = (0.5, 0.5, 0.5)
self.import_casting(shot_data, strip)
for task_type in task_types:
if import_shots.import_source == 'DISK':
preview = self.find_shot_preview(sequence, shot_data['name'], task_type)