🪲 fix task and product type

This commit is contained in:
Ondřej Samohel 2025-10-17 11:44:33 +02:00
parent fd5a5a2142
commit fe7adf36e6
No known key found for this signature in database
GPG key ID: 02376E18990A97C6

View file

@ -81,12 +81,18 @@ class CollectResourcesPath(pyblish.api.InstancePlugin):
# TODO remove when all clients have solved this issue
template_data.update({"frame": "FRAME_TEMP", "representation": "TEMP"})
task_name = task_type = None
task_entity = instance.data.get("taskEntity")
if task_entity:
task_name = task_entity.name
task_type = task_entity.type
template_name = get_publish_template_name(
project_name=template_data["project"]["name"],
host_name=instance.context.data["hostName"],
product_type=template_data["product"]["type"],
task_name=template_data["product"]["name"],
task_type=template_data["product"]["type"],
product_type=instance.data["productType"],
task_name=task_name,
task_type=task_type,
project_settings=instance.context.data["project_settings"],
logger=self.log,
)