From 2375dda43bb72ac8c5396423a8b76ec35c41878f Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Tue, 18 Nov 2025 17:10:38 +0200 Subject: [PATCH 1/4] Add `folderpaths` for template profile filtering --- .../pipeline/workfile/workfile_template_builder.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/client/ayon_core/pipeline/workfile/workfile_template_builder.py b/client/ayon_core/pipeline/workfile/workfile_template_builder.py index 52e27baa80..9c77d2f7f7 100644 --- a/client/ayon_core/pipeline/workfile/workfile_template_builder.py +++ b/client/ayon_core/pipeline/workfile/workfile_template_builder.py @@ -832,14 +832,18 @@ class AbstractTemplateBuilder(ABC): host_name = self.host_name task_name = self.current_task_name task_type = self.current_task_type + folder_path = self.current_folder_path build_profiles = self._get_build_profiles() + filter_data = { + "task_types": task_type, + "task_names": task_name, + "folder_paths": folder_path + } profile = filter_profiles( build_profiles, - { - "task_types": task_type, - "task_names": task_name - } + filter_data, + logger=self.log ) if not profile: raise TemplateProfileNotFound(( From 17f5788e43e980d308ef7f3442d59a05cbe7a216 Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Wed, 19 Nov 2025 12:56:01 +0200 Subject: [PATCH 2/4] Template Builder: Add folder types to filter data --- .../pipeline/workfile/workfile_template_builder.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/ayon_core/pipeline/workfile/workfile_template_builder.py b/client/ayon_core/pipeline/workfile/workfile_template_builder.py index 9c77d2f7f7..25b1c6737b 100644 --- a/client/ayon_core/pipeline/workfile/workfile_template_builder.py +++ b/client/ayon_core/pipeline/workfile/workfile_template_builder.py @@ -834,12 +834,17 @@ class AbstractTemplateBuilder(ABC): task_type = self.current_task_type folder_path = self.current_folder_path - build_profiles = self._get_build_profiles() filter_data = { "task_types": task_type, "task_names": task_name, "folder_paths": folder_path } + + folder_entity = self.current_folder_entity + if folder_entity: + filter_data.update({"folder_types": folder_entity["folderType"]}) + + build_profiles = self._get_build_profiles() profile = filter_profiles( build_profiles, filter_data, From 6125a7db803dd2bfe878fa0fe255822b9a0655c6 Mon Sep 17 00:00:00 2001 From: Mustafa Zaky Jafar Date: Wed, 19 Nov 2025 13:15:37 +0200 Subject: [PATCH 3/4] Update client/ayon_core/pipeline/workfile/workfile_template_builder.py Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- .../pipeline/workfile/workfile_template_builder.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/client/ayon_core/pipeline/workfile/workfile_template_builder.py b/client/ayon_core/pipeline/workfile/workfile_template_builder.py index dfb17b850f..6c0bc4c602 100644 --- a/client/ayon_core/pipeline/workfile/workfile_template_builder.py +++ b/client/ayon_core/pipeline/workfile/workfile_template_builder.py @@ -841,16 +841,18 @@ class AbstractTemplateBuilder(ABC): task_name = self.current_task_name task_type = self.current_task_type folder_path = self.current_folder_path + folder_type = None + folder_entity = self.current_folder_entity + if folder_entity: + folder_type = folder_entity["folderType"] filter_data = { "task_types": task_type, "task_names": task_name, - "folder_paths": folder_path + "folder_types": folder_type, + "folder_paths": folder_path, } - folder_entity = self.current_folder_entity - if folder_entity: - filter_data.update({"folder_types": folder_entity["folderType"]}) build_profiles = self._get_build_profiles() profile = filter_profiles( From 42da0fb424a0b3c07b2da8b38897851ebc025b61 Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Wed, 19 Nov 2025 13:17:12 +0200 Subject: [PATCH 4/4] Make Ruff Happy. --- client/ayon_core/pipeline/workfile/workfile_template_builder.py | 1 - 1 file changed, 1 deletion(-) diff --git a/client/ayon_core/pipeline/workfile/workfile_template_builder.py b/client/ayon_core/pipeline/workfile/workfile_template_builder.py index 6c0bc4c602..cbe9f82a81 100644 --- a/client/ayon_core/pipeline/workfile/workfile_template_builder.py +++ b/client/ayon_core/pipeline/workfile/workfile_template_builder.py @@ -853,7 +853,6 @@ class AbstractTemplateBuilder(ABC): "folder_paths": folder_path, } - build_profiles = self._get_build_profiles() profile = filter_profiles( build_profiles,