diff --git a/operators/imports.py b/operators/imports.py index fcd8718..b37d7ff 100644 --- a/operators/imports.py +++ b/operators/imports.py @@ -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)