fix report error spreadsheet
parent
4ae3f978bc
commit
83d34c2e67
|
@ -324,6 +324,8 @@ class VSETB_OT_import_spreadsheet(Operator):
|
|||
spreadsheet = project.spreadsheet_import
|
||||
sequencer = scn.sequence_editor.sequences
|
||||
|
||||
assets_missing = []
|
||||
|
||||
# Import Edit
|
||||
nb_frames_cell = next((c for c in spreadsheet.cells if c.import_name=='Nb Frames'), None)
|
||||
|
||||
|
@ -420,6 +422,8 @@ class VSETB_OT_import_spreadsheet(Operator):
|
|||
if not asset_name:
|
||||
continue
|
||||
|
||||
#print(norm_str(asset_name), norm_str(project.assets[0].tracker_name))
|
||||
|
||||
if spreadsheet.use_custom_name:
|
||||
asset = next((a for a in project.assets if norm_str(a.get('metadata', {}).get(spreadsheet.custom_name)) == norm_str(asset_name)), None)
|
||||
else:
|
||||
|
@ -433,8 +437,12 @@ class VSETB_OT_import_spreadsheet(Operator):
|
|||
|
||||
strip_settings.casting.update()
|
||||
else:
|
||||
print(f'Asset {asset_name} not found in Project for strip {strip.name}')
|
||||
self.report({'WARNING'}, f'Asset {asset_name} not found in Project for strip {strip.name}')
|
||||
assets_missing.append(asset_name)
|
||||
#print(f'Asset {asset_name} not found in Project for strip {strip.name}')
|
||||
#self.report({'WARNING'}, f'Asset {asset_name} not found in Project for strip {strip.name}')
|
||||
|
||||
if assets_missing:
|
||||
self.report({'WARNING'}, f'Some assets were missing {assets_missing[:5]}...')
|
||||
|
||||
return {"FINISHED"}
|
||||
|
||||
|
|
Loading…
Reference in New Issue