From afb8826a7232b48b02dfc129aa1a9fcc3730937f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cchristopheseux=E2=80=9D?= <“seuxchristophe@hotmail.fr”> Date: Thu, 27 Apr 2023 11:26:19 +0200 Subject: [PATCH] fix copy metadata --- operators/operators.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)