Refacto of the scene cut detection, make it generic and add another algorythm as an option

This commit is contained in:
2025-01-10 16:24:52 +01:00
parent de16df05ef
commit 425c842bfd
8 changed files with 248 additions and 155 deletions
+7 -3
View File
@@ -355,7 +355,9 @@ class VSETB_OT_import_spreadsheet(Operator):
#print(SPREADSHEET[:2])
cell_types = project.get_cell_types()
cell_names = {k: spreadsheet.cells[k].import_name for k in header if k}
header_enabled = [x for x in header if spreadsheet.cells[x].enabled]
cell_names = {x: spreadsheet.cells[x].import_name for x in header_enabled if x}
#separator = spreadsheet.separator.replace('\\n', '\n').replace('\\t', '\t').replace('\\r', '\r')
@@ -364,10 +366,12 @@ class VSETB_OT_import_spreadsheet(Operator):
frame_start = scn.frame_start
for row in SPREADSHEET[1:]:
#print(row)
cell_data = {cell_names[k]: v for k, v in zip(header, row) if k}
#cell_data = {k: v for k, v in zip(header, row)}
cell_data = {cell_names[k]: v for k, v in zip(header, row) if k in cell_names}
shot_name = cell_data['Shot']
if not shot_name:
raise Exception()
#strip = next((s for s in sequencer if s.vsetb_strip_settings.source_name == shot_name), None)
strip = next((s for s in shot_strips if s.name == shot_name), None)