From 9375daac073f53dba44e4dc32e1dfd8a31d80dd0 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Wed, 14 Jul 2021 11:23:44 +0200 Subject: [PATCH] use PublishAttributes in CreatedInstance --- openpype/pipeline/creator_plugins.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/openpype/pipeline/creator_plugins.py b/openpype/pipeline/creator_plugins.py index 568c44e1d4..c1001a50d4 100644 --- a/openpype/pipeline/creator_plugins.py +++ b/openpype/pipeline/creator_plugins.py @@ -244,7 +244,9 @@ class CreatedInstance: # Stored publish specific attribute values # {: {key: value}} - self._data["publish_attributes"] = {} + self._data["publish_attributes"] = PublishAttributes( + self, orig_publish_attributes, attr_plugins + ) if data: self._data.update(data) @@ -281,6 +283,10 @@ class CreatedInstance: def family_attribute_defs(self): return self._data["family_attributes"].attr_defs + @property + def publish_attributes(self): + return self._data["publish_attributes"] + def data_to_store(self): output = collections.OrderedDict() for key, value in self._data.items(): @@ -318,6 +324,9 @@ class CreatedInstance: attr_plugins, new=False ) + def set_publish_plugins(self, attr_plugins): + self._data["publish_attributes"].set_publish_plugins(attr_plugins) + @six.add_metaclass(ABCMeta)