Fix export csv

pull/5/head
“christopheseux” 2023-06-21 11:14:56 +02:00
parent 4a2dc9e55e
commit 4ae3f978bc
3 changed files with 6 additions and 1 deletions

View File

@ -532,6 +532,9 @@ class VSETB_OT_export_spreadsheet(Operator):
cells = spreadsheet.cells cells = spreadsheet.cells
rows.append([cell.name for cell in cells]) rows.append([cell.name for cell in cells])
#print(rows)
#raise Exception('')
separator = spreadsheet.separator.replace('\\n', '\n').replace('\\t', '\t').replace('\\r', '\r') separator = spreadsheet.separator.replace('\\n', '\n').replace('\\t', '\t').replace('\\r', '\r')
delimiter = spreadsheet.delimiter.replace('\\n', '\n').replace('\\t', '\t').replace('\\r', '\r') delimiter = spreadsheet.delimiter.replace('\\n', '\n').replace('\\t', '\t').replace('\\r', '\r')

View File

@ -49,7 +49,7 @@ def get_strips(channel=0, selected_only=False):
if isinstance(channel, str): if isinstance(channel, str):
channel = get_channel_index(channel) channel = get_channel_index(channel)
strips = [s for s in scn.sequence_editor.sequences_all if s.channel==channel] strips = [s for s in scn.sequence_editor.sequences if s.channel==channel]
if selected_only: if selected_only:
strips = [s for s in strips if s.select] strips = [s for s in strips if s.select]

View File

@ -311,12 +311,14 @@ class Project(PropertyGroup):
def set_spreadsheet(self): def set_spreadsheet(self):
cell_names = ['Sequence', 'Shot', 'Nb Frames', 'Description'] cell_names = ['Sequence', 'Shot', 'Nb Frames', 'Description']
if self.type == 'TVSHOW': if self.type == 'TVSHOW':
cell_names.insert(0, 'Episode') cell_names.insert(0, 'Episode')
# Export SpreadSheet # Export SpreadSheet
spreadsheet = self.spreadsheet_export spreadsheet = self.spreadsheet_export
spreadsheet.cells.clear()
for cell_name in cell_names: for cell_name in cell_names:
cell = spreadsheet.cells.add() cell = spreadsheet.cells.add()
cell.name = cell_name cell.name = cell_name