From 6fcb38fc7243250cc75b9a11024116bab453ec00 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 1 Oct 2021 17:24:35 +0200 Subject: [PATCH] creators have more responsibility about instances --- openpype/pipeline/create/creator_plugins.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/openpype/pipeline/create/creator_plugins.py b/openpype/pipeline/create/creator_plugins.py index 85f6f0cd75..6e5b4b5991 100644 --- a/openpype/pipeline/create/creator_plugins.py +++ b/openpype/pipeline/create/creator_plugins.py @@ -90,14 +90,24 @@ class BaseCreator: """ pass - def remove_instance(self, instance): + @abstractmethod + def collect_instances(self, attr_plugins=None): + pass + + @abstractmethod + def update_instances(self, update_list): + pass + + @abstractmethod + def remove_instances(self, instances): """Method called on instance removement. Can also remove instance metadata from context but should return 'True' if did so. Args: - instance(CreatedInstance): Instance object which will be removed. + instance(list): Instance objects which should be + removed. Returns: bool: Instance was removed completely and is not required to call