From 132525024fe06d937aa4e82f1cfa18e514aa47c7 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Thu, 25 Jul 2024 14:03:19 +0200 Subject: [PATCH] Fix #4: Set product group without the suffix so it becomes one texture set group --- .../publish/collect_textureset_images.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/client/ayon_substancepainter/plugins/publish/collect_textureset_images.py b/client/ayon_substancepainter/plugins/publish/collect_textureset_images.py index 5bea3e9..b0bdc85 100644 --- a/client/ayon_substancepainter/plugins/publish/collect_textureset_images.py +++ b/client/ayon_substancepainter/plugins/publish/collect_textureset_images.py @@ -92,10 +92,10 @@ def create_image_instance(self, instance, template, outputs, task_name = task_entity["name"] task_type = task_entity["taskType"] + # TODO: The product type actually isn't 'texture' currently but + # for now this is only done so the product name starts with + # 'texture' image_product_name = get_product_name( - # TODO: The product type actually isn't 'texture' currently but - # for now this is only done so the product name starts with - # 'texture' context.data["projectName"], task_name, task_type, @@ -104,6 +104,15 @@ def create_image_instance(self, instance, template, outputs, variant=instance.data["variant"] + suffix, project_settings=context.data["project_settings"] ) + image_product_group_name = get_product_name( + context.data["projectName"], + task_name, + task_type, + context.data["hostName"], + product_type="texture", + variant=instance.data["variant"], + project_settings=context.data["project_settings"] + ) # Prepare representation representation = { @@ -141,7 +150,7 @@ def create_image_instance(self, instance, template, outputs, image_instance.data["representations"] = [representation] # Group the textures together in the loader - image_instance.data["productGroup"] = image_product_name + image_instance.data["productGroup"] = image_product_group_name # Store the texture set name and stack name on the instance image_instance.data["textureSetName"] = texture_set_name