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