fix copy metadata

pull/5/head
“christopheseux” 2023-04-27 11:26:19 +02:00
parent dc345382bd
commit afb8826a72
1 changed files with 3 additions and 3 deletions

View File

@ -73,10 +73,10 @@ class VSETB_OT_copy_metadata(Operator):
settings = get_scene_settings()
project = settings.active_project
metadata = next(k for k, v in project.metadata_types.items() if v.name == self.metadata)
print('VSETB_OT_copy_metadata', self.metadata, metadata)
metadata = next((m.field_name for m in project.metadata_types if m.name == self.metadata), None)
if not metadata:
self.report({'ERROR'}, f'No Metadata named {self.metadata}')
active_strip = context.active_sequence_strip
metadata_value = getattr(active_strip.vsetb_strip_settings.metadata, metadata)