From 8cf50d065164e5b5a580faa59191ed5d80b7e73f Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Thu, 8 Aug 2024 11:42:32 +0200 Subject: [PATCH] Refactor timeline naming logic for editorial package - Refactored timeline name creation based on folder path - Added metadata clearing for timeline clips --- .../ayon_resolve/plugins/load/load_editorial_package.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/client/ayon_resolve/plugins/load/load_editorial_package.py b/client/ayon_resolve/plugins/load/load_editorial_package.py index 38905f6d55..1e4d95c6e6 100644 --- a/client/ayon_resolve/plugins/load/load_editorial_package.py +++ b/client/ayon_resolve/plugins/load/load_editorial_package.py @@ -41,7 +41,11 @@ def load(self, context, name, namespace, data): # create versioned bin for editorial package version_name = context["version"]["name"] loaded_bin = lib.create_bin(f"{folder_path}/{name}/{version_name}") - loaded_timeline_name = f"{name}_{version_name}_timeline" + + # make timeline unique name based on folder path + folder_path_name = folder_path.replace("/", "_").lstrip("_") + loaded_timeline_name = ( + f"{folder_path_name}_{name}_{version_name}_timeline") import_options = { "timelineName": loaded_timeline_name, "importSourceClips": True, @@ -75,6 +79,9 @@ def load(self, context, name, namespace, data): print("Timeline imported: ", timeline) def update(self, container, context): + timeline_mp_clip = container["_item"] + timeline_mp_clip.SetMetadata(lib.pype_tag_name, "") + self.load( context, context["product"]["name"],