fix import custom_name
parent
a14b28362f
commit
ccd326fc7e
|
@ -384,7 +384,7 @@ class VSETB_OT_import_spreadsheet(Operator):
|
||||||
|
|
||||||
if cell_type == 'ASSET_TYPE' and spreadsheet.import_casting:
|
if cell_type == 'ASSET_TYPE' and spreadsheet.import_casting:
|
||||||
|
|
||||||
print(cell_value)
|
#print(cell_value)
|
||||||
asset_names = cell_value.split('\n')
|
asset_names = cell_value.split('\n')
|
||||||
|
|
||||||
# Clear the list of assets
|
# Clear the list of assets
|
||||||
|
@ -396,8 +396,11 @@ class VSETB_OT_import_spreadsheet(Operator):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
print(asset_name)
|
print(asset_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:
|
||||||
|
asset = next((a for a in project.assets if norm_str(a.tracker_name) == norm_str(asset_name)), None)
|
||||||
|
|
||||||
asset = next((a for a in project.assets if norm_str(a.tracker_name) == norm_str(asset_name)), None)
|
|
||||||
if asset:
|
if asset:
|
||||||
item = strip_settings.casting.add()
|
item = strip_settings.casting.add()
|
||||||
item.name = asset.name
|
item.name = asset.name
|
||||||
|
|
Loading…
Reference in New Issue