start import csv

This commit is contained in:
“christopheseux”
2023-05-04 14:55:53 +02:00
parent 2d24e3da7f
commit ec4212740c
4 changed files with 75 additions and 11 deletions
+2 -1
View File
@@ -160,7 +160,8 @@ class VSETB_PT_imports(VSETB_main, Panel):
col = layout.column()
#row = col.row(align=True)
col.operator('vse_toolbox.import_files', text='Import', icon='IMPORT')
#col.operator('vse_toolbox.import_files', text='Import', icon='IMPORT')
col.operator('vse_toolbox.import_spreadsheet', text='Import Spreadsheet', icon='SPREADSHEET')
class VSETB_PT_presets(PresetPanel, Panel):
+2 -1
View File
@@ -173,6 +173,7 @@ def get_custom_name_items(self, context):
return [(m.field_name, m.name, '') for m in project.metadata_types if m.entity_type=='ASSET']
class SpreadsheetExport(PropertyGroup):
use_custom_cells: BoolProperty(default=False)
format : EnumProperty(items=[(i, i, '') for i in ('CSV', 'XLSX')])
separator : StringProperty(default='\\n')
delimiter : StringProperty(default=';')
@@ -188,13 +189,13 @@ class SpreadsheetExport(PropertyGroup):
class SpreadsheetImport(PropertyGroup):
use_custom_cells: BoolProperty(default=False)
separator : StringProperty(default='\\n')
delimiter : StringProperty(default=';')
use_custom_name : BoolProperty(default=False)
custom_name : EnumProperty(items=get_custom_name_items,
description='Use a custom name for asset using a metadata value')
show_settings : BoolProperty(default=False)
cells: CollectionProperty(type=SpreadsheetCell)
cell_index : IntProperty(name='Spreadsheet Index', default=0)