diff --git a/operators/operators.py b/operators/operators.py index 3e05e4a..bf512cf 100644 --- a/operators/operators.py +++ b/operators/operators.py @@ -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)