From 45da6cf5d0fbdb31a91eef2115e04299860f5f48 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Mon, 22 Aug 2022 17:50:06 +0200 Subject: [PATCH] Added possibility to propagate collected variant context.data["variant"] might be filled only by collect_batch_data, which should take precedence --- openpype/hosts/photoshop/plugins/publish/collect_workfile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/photoshop/plugins/publish/collect_workfile.py b/openpype/hosts/photoshop/plugins/publish/collect_workfile.py index 6599f5c96e..9cf6d5227e 100644 --- a/openpype/hosts/photoshop/plugins/publish/collect_workfile.py +++ b/openpype/hosts/photoshop/plugins/publish/collect_workfile.py @@ -22,9 +22,11 @@ class CollectWorkfile(pyblish.api.ContextPlugin): break family = "workfile" + # context.data["variant"] might come only from collect_batch_data + variant = context.data.get("variant") or self.default_variant subset = get_subset_name_with_asset_doc( family, - self.default_variant, + variant, context.data["anatomyData"]["task"]["name"], context.data["assetEntity"], context.data["anatomyData"]["project"]["name"],