export comments in spreadsheet

pull/5/head
florentin.luce 2024-02-15 10:14:25 +01:00
parent c0b944f114
commit 697ead9329
2 changed files with 12 additions and 3 deletions

View File

@ -580,13 +580,12 @@ class VSETB_OT_export_spreadsheet(Operator):
if cell.type == "METADATA":
row += [getattr(strip.vsetb_strip_settings.metadata, cell.field_name)]
elif cell.type == "ASSET_TYPE":
asset_castings = []
for asset_casting in strip.vsetb_strip_settings.casting:
asset = asset_casting.asset
#print('------------------------')
if not asset:
self.report({"WARNING"}, f"The asset {asset_casting['_name']} is missing on strip {strip.name}")
continue
@ -605,6 +604,9 @@ class VSETB_OT_export_spreadsheet(Operator):
row += [separator.join(asset_castings)]
elif cell.type == 'TASK_TYPE':
row += [getattr(strip.vsetb_strip_settings.tasks, cell.name).comment]
elif cell.field_name == 'EPISODE':
row += [settings.active_episode.name]
elif cell.field_name == 'SEQUENCE':

View File

@ -139,7 +139,7 @@ class SpreadsheetExportCell(PropertyGroup):
export_name : StringProperty()
enabled : BoolProperty(default=True)
field_name : StringProperty()
type : EnumProperty(items=[(t, t, "") for t in ('METADATA', 'SHOT', 'ASSET_TYPE')])
type : EnumProperty(items=[(t, t, "") for t in ('METADATA', 'SHOT', 'ASSET_TYPE', 'TASK_TYPE')])
#sort : BoolProperty(default=True)
@ -346,6 +346,13 @@ class Project(PropertyGroup):
cell.field_name = norm_str(asset_type.name, format=str.upper)
cell.type = "ASSET_TYPE"
for task_type in self.task_types:
cell = spreadsheet.cells.add()
cell.name = task_type.name
cell.export_name = task_type.name
cell.field_name = norm_str(task_type.name, format=str.upper)
cell.type = "TASK_TYPE"
def set_strip_metadata(self):
# Clear Metadatas