From 324bbc09d8edee63d8b20763a6ff71a095d37536 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Mon, 12 Jul 2021 13:59:16 +0200 Subject: [PATCH] from_existing is class method --- openpype/pipeline/creator_plugins.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openpype/pipeline/creator_plugins.py b/openpype/pipeline/creator_plugins.py index 5bc5bd5703..57774cff70 100644 --- a/openpype/pipeline/creator_plugins.py +++ b/openpype/pipeline/creator_plugins.py @@ -65,15 +65,15 @@ class AvalonInstance: data[key] = self.data.pop(key) self.data = data - @staticmethod - def from_existing(instance_data): + @classmethod + def from_existing(cls, instance_data): """Convert instance data from workfile to AvalonInstance.""" instance_data = copy.deepcopy(instance_data) family = instance_data.pop("family", None) subset_name = instance_data.pop("subset", None) - return AvalonInstance(family, subset_name, instance_data, new=False) + return cls(family, subset_name, instance_data, new=False) @six.add_metaclass(ABCMeta)