Fix import csv and update edit

This commit is contained in:
christopheseux
2023-07-11 16:27:43 +02:00
parent 24c6f12402
commit c43d1b3f35
4 changed files with 70 additions and 39 deletions
+9 -4
View File
@@ -86,6 +86,7 @@ class VSETB_OT_import_files(Operator):
import_edit : BoolProperty(name='', default=True)
edit: EnumProperty(name='', items=lambda s, c: EDITS)
match_by : EnumProperty(name='Match By', items=[('NAME', 'Name', ''), ('INDEX', 'Index', '')])
import_movie : BoolProperty(name='', default=False)
movie: EnumProperty(name='', items=lambda s, c: MOVIES)
@@ -108,19 +109,23 @@ class VSETB_OT_import_files(Operator):
col = layout.column(align=True)
col.operator('import.auto_select_files', text='Auto Select')
row = self.layout.row(heading="Import Edit", align=True)
row = layout.row(heading="Import Edit", align=True)
row.prop(self, 'import_edit')
sub = row.row(align=True)
sub.active = self.import_edit
sub.prop(self, 'edit')
row = layout.row(align=True)
row.prop(self, 'match_by', expand=True)
row = self.layout.row(heading="Import Movie", align=True)
layout.separator()
row = layout.row(heading="Import Movie", align=True)
row.prop(self, 'import_movie')
sub = row.row()
sub.active = self.import_movie
sub.prop(self, 'movie')
row = self.layout.row(heading="Import Sound", align=True)
row = layout.row(heading="Import Sound", align=True)
row.prop(self, 'import_sound')
sub = row.row()
sub.active = self.import_sound
@@ -159,7 +164,7 @@ class VSETB_OT_import_files(Operator):
if self.import_edit:
print(f'[>.] Loading Edit from: {str(edit_filepath)}')
import_edit(edit_filepath, adapter="cmx_3600")
import_edit(edit_filepath, adapter="cmx_3600", match_by=self.match_by)
if self.import_movie:
print(f'[>.] Loading Movie from: {str(movie_filepath)}')