From 8e0239c747ba6c3545bfc9ffaba0ba8ed998b7e0 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Fri, 13 Feb 2026 11:50:07 +0100 Subject: [PATCH 1/6] keep product base type and product type from instances --- .../ayon_core/pipeline/farm/pyblish_functions.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/client/ayon_core/pipeline/farm/pyblish_functions.py b/client/ayon_core/pipeline/farm/pyblish_functions.py index f3b2e04770..3e548d7feb 100644 --- a/client/ayon_core/pipeline/farm/pyblish_functions.py +++ b/client/ayon_core/pipeline/farm/pyblish_functions.py @@ -221,13 +221,18 @@ def create_skeleton_instance( "This may cause issues.").format(source)) # QUESTION why is 'render' product base type enforced here? - product_base_type = "render" - if "prerender.farm" in instance.data["families"]: - product_base_type = "prerender" + product_base_type = instance.data.get("productBaseType") + product_type = None + if product_base_type: + product_type = instance.data.get("productType") + product_base_type = "render" + if "prerender.farm" in instance.data["families"]: + product_base_type = "prerender" + + if not product_type: + product_type = product_base_type families = [product_base_type] - # TODO find out how to get 'product_type' - product_type = product_base_type # pass review to families if marked as review if data.get("review"): From bccf80facff2d611e9e68a233b924db41a4c31e9 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Fri, 13 Feb 2026 12:13:37 +0100 Subject: [PATCH 2/6] fix condition --- client/ayon_core/pipeline/farm/pyblish_functions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/ayon_core/pipeline/farm/pyblish_functions.py b/client/ayon_core/pipeline/farm/pyblish_functions.py index 3e548d7feb..74bf1606de 100644 --- a/client/ayon_core/pipeline/farm/pyblish_functions.py +++ b/client/ayon_core/pipeline/farm/pyblish_functions.py @@ -223,7 +223,7 @@ def create_skeleton_instance( # QUESTION why is 'render' product base type enforced here? product_base_type = instance.data.get("productBaseType") product_type = None - if product_base_type: + if not product_base_type: product_type = instance.data.get("productType") product_base_type = "render" if "prerender.farm" in instance.data["families"]: From 5bfc33f9a4ac7452cbc8a9d017a5a8c7f4c590ad Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Fri, 13 Feb 2026 12:19:17 +0100 Subject: [PATCH 3/6] move specific logic --- client/ayon_core/pipeline/farm/pyblish_functions.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/ayon_core/pipeline/farm/pyblish_functions.py b/client/ayon_core/pipeline/farm/pyblish_functions.py index 74bf1606de..4d4d051381 100644 --- a/client/ayon_core/pipeline/farm/pyblish_functions.py +++ b/client/ayon_core/pipeline/farm/pyblish_functions.py @@ -222,9 +222,11 @@ def create_skeleton_instance( # QUESTION why is 'render' product base type enforced here? product_base_type = instance.data.get("productBaseType") - product_type = None - if not product_base_type: + if product_base_type: product_type = instance.data.get("productType") + else: + # This is old way of defining product base type + product_type = None product_base_type = "render" if "prerender.farm" in instance.data["families"]: product_base_type = "prerender" From 9f6afb13ee3e6b8a2c9a5af5d70150cdbc983788 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Fri, 13 Feb 2026 12:36:23 +0100 Subject: [PATCH 4/6] modify comment --- client/ayon_core/pipeline/farm/pyblish_functions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/ayon_core/pipeline/farm/pyblish_functions.py b/client/ayon_core/pipeline/farm/pyblish_functions.py index 4d4d051381..a357ac7f7d 100644 --- a/client/ayon_core/pipeline/farm/pyblish_functions.py +++ b/client/ayon_core/pipeline/farm/pyblish_functions.py @@ -225,7 +225,8 @@ def create_skeleton_instance( if product_base_type: product_type = instance.data.get("productType") else: - # This is old way of defining product base type + # This is the old way of defining product base type + # - hard-coded product base type product_type = None product_base_type = "render" if "prerender.farm" in instance.data["families"]: From 4714b5868a84ea4e34536b9ef794f561589618bd Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Fri, 13 Feb 2026 16:36:30 +0100 Subject: [PATCH 5/6] auto-fill variants if are None --- client/ayon_core/pipeline/farm/pyblish_functions.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/ayon_core/pipeline/farm/pyblish_functions.py b/client/ayon_core/pipeline/farm/pyblish_functions.py index a357ac7f7d..2ed55244ed 100644 --- a/client/ayon_core/pipeline/farm/pyblish_functions.py +++ b/client/ayon_core/pipeline/farm/pyblish_functions.py @@ -193,6 +193,11 @@ def create_skeleton_instance( """ # list of family names to transfer to new family if present + if families_transfer is None: + families_transfer = [] + + if instance_transfer is None: + instance_transfer = {} context = instance.context data = instance.data.copy() From 986accb250fda7d9f0d550d3ac7d19726cd4f635 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Fri, 13 Feb 2026 17:05:32 +0100 Subject: [PATCH 6/6] reverted some of the logic back --- .../pipeline/farm/pyblish_functions.py | 30 ++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/client/ayon_core/pipeline/farm/pyblish_functions.py b/client/ayon_core/pipeline/farm/pyblish_functions.py index 2ed55244ed..e94184a5f6 100644 --- a/client/ayon_core/pipeline/farm/pyblish_functions.py +++ b/client/ayon_core/pipeline/farm/pyblish_functions.py @@ -225,17 +225,25 @@ def create_skeleton_instance( log.warning(("Could not find root path for remapping \"{}\". " "This may cause issues.").format(source)) - # QUESTION why is 'render' product base type enforced here? - product_base_type = instance.data.get("productBaseType") - if product_base_type: - product_type = instance.data.get("productType") - else: - # This is the old way of defining product base type - # - hard-coded product base type - product_type = None - product_base_type = "render" - if "prerender.farm" in instance.data["families"]: - product_base_type = "prerender" + # This is a hack to keep the value of 'productType'. + # Because this function does not use product base type from source + # instance and we don't know if product type of the instance was + # customized or not, only way how to guess custom product type is + # to check if is same as product base type. + i_product_base_type = instance.data.get("productBaseType") + i_product_type = instance.data.get("productType") + product_type = None + if ( + i_product_base_type + and i_product_base_type != i_product_type + ): + product_type = i_product_type + + # This is the old way of defining product base type + # - hard-coded product base type + product_base_type = "render" + if "prerender.farm" in instance.data["families"]: + product_base_type = "prerender" if not product_type: product_type = product_base_type