From c3a8c2ac7f1f7869ef8c7ec09988e571c2a399e4 Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Fri, 9 Feb 2024 16:55:54 +0100 Subject: [PATCH] build workfile works with new keys --- client/ayon_core/pipeline/workfile/build_workfile.py | 10 +++++----- client/ayon_core/settings/ayon_settings.py | 11 +---------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/client/ayon_core/pipeline/workfile/build_workfile.py b/client/ayon_core/pipeline/workfile/build_workfile.py index c62facaaa9..8df3830d6e 100644 --- a/client/ayon_core/pipeline/workfile/build_workfile.py +++ b/client/ayon_core/pipeline/workfile/build_workfile.py @@ -321,7 +321,7 @@ class BuildWorkfile: continue # Check families - profile_families = profile.get("families") + profile_families = profile.get("product_types") if not profile_families: self.log.warning(( "Build profile is missing families configuration: {0}" @@ -338,7 +338,7 @@ class BuildWorkfile: continue # Prepare lowered families and representation names - profile["families_lowered"] = [ + profile["product_types_lowered"] = [ fam.lower() for fam in profile_families ] profile["repre_names_lowered"] = [ @@ -375,11 +375,11 @@ class BuildWorkfile: family_low = family.lower() for profile in profiles: # Skip profile if does not contain family - if family_low not in profile["families_lowered"]: + if family_low not in profile["product_types_lowered"]: continue # Precompile name filters as regexes - profile_regexes = profile.get("subset_name_filters") + profile_regexes = profile.get("product_name_filters") if profile_regexes: _profile_regexes = [] for regex in profile_regexes: @@ -538,7 +538,7 @@ class BuildWorkfile: build_presets += self.build_presets.get("linked_assets", []) subset_ids_ordered = [] for preset in build_presets: - for preset_family in preset["families"]: + for preset_family in preset["product_types"]: for id, subset in subsets_by_id.items(): if preset_family not in subset["data"].get("families", []): continue diff --git a/client/ayon_core/settings/ayon_settings.py b/client/ayon_core/settings/ayon_settings.py index 5734ac0707..40d4c775be 100644 --- a/client/ayon_core/settings/ayon_settings.py +++ b/client/ayon_core/settings/ayon_settings.py @@ -333,16 +333,7 @@ def _convert_maya_project_settings(ayon_settings, output): ayon_maya = ayon_settings["maya"] - # Workfile build - ayon_workfile_build = ayon_maya["workfile_build"] - for item in ayon_workfile_build["profiles"]: - for key in ("current_context", "linked_assets"): - for subitem in item[key]: - if "families" in subitem: - break - subitem["families"] = subitem.pop("product_types") - subitem["subset_name_filters"] = subitem.pop( - "product_name_filters") + _convert_host_imageio(ayon_maya) output["maya"] = ayon_maya