From 51a0417ea88da4f27d7f7b9f9952d095ebf6c961 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Fri, 2 Aug 2024 02:00:09 +0200 Subject: [PATCH] Fix Collect USD Layers logic + transfer `productGroup` to the extra product --- .../plugins/publish/collect_usd_layers.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/client/ayon_houdini/plugins/publish/collect_usd_layers.py b/client/ayon_houdini/plugins/publish/collect_usd_layers.py index 5fa787fb39..9d3459f084 100644 --- a/client/ayon_houdini/plugins/publish/collect_usd_layers.py +++ b/client/ayon_houdini/plugins/publish/collect_usd_layers.py @@ -114,7 +114,7 @@ def process(self, instance): project_name = context.data["projectName"] variant_base = instance.data["variant"] - subset = get_product_name( + product_name = get_product_name( project_name=project_name, # TODO: This should use task from `instance` task_name=context.data["anatomyData"]["task"]["name"], @@ -125,17 +125,20 @@ def process(self, instance): project_settings=context.data["project_settings"] ) - label = "{0} -> {1}".format(instance.data["name"], subset) + label = "{0} -> {1}".format(instance.data["name"], product_name) family = "usd" layer_inst.data["family"] = family layer_inst.data["families"] = [family] - layer_inst.data["subset"] = subset + layer_inst.data["productName"] = product_name + layer_inst.data["productType"] = instance.data["productType"] layer_inst.data["label"] = label - layer_inst.data["asset"] = instance.data["asset"] + layer_inst.data["folderPath"] = instance.data["folderPath"] layer_inst.data["task"] = instance.data.get("task") layer_inst.data["instance_node"] = instance.data["instance_node"] layer_inst.data["render"] = False layer_inst.data["output_node"] = creator_node + if instance.data.get("productGroup"): + layer_inst.data["productGroup"] = instance.data["productGroup"] # Inherit "use handles" from the source instance # TODO: Do we want to maybe copy full `publish_attributes` instead?