From 205d9d0dd00fa0327b3b96fab35beea38eabecad Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Tue, 13 Apr 2021 13:07:02 +0200 Subject: [PATCH] set asset name to context --- .../hosts/tvpaint/plugins/publish/collect_workfile_data.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openpype/hosts/tvpaint/plugins/publish/collect_workfile_data.py b/openpype/hosts/tvpaint/plugins/publish/collect_workfile_data.py index 7965112136..253d307a76 100644 --- a/openpype/hosts/tvpaint/plugins/publish/collect_workfile_data.py +++ b/openpype/hosts/tvpaint/plugins/publish/collect_workfile_data.py @@ -67,7 +67,9 @@ class CollectWorkfileData(pyblish.api.ContextPlugin): for env_key, key in key_map: avalon.api.Session[env_key] = workfile_context[key] os.environ[env_key] = workfile_context[key] + asset_name = workfile_context["asset"] else: + asset_name = current_context["asset"] # Handle older workfiles or workfiles without metadata self.log.warning( "Workfile does not contain information about context." @@ -77,6 +79,7 @@ class CollectWorkfileData(pyblish.api.ContextPlugin): context.data["workfile_context"] = workfile_context self.log.info("Context changed to: {}".format(workfile_context)) + context.data["asset"] = asset_name # Collect instances self.log.info("Collecting instance data from workfile")