From f5e36197ebdab39f4c2174c986fe36882ac7ce92 Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Mon, 4 Mar 2024 18:13:06 +0100 Subject: [PATCH] rename 'SubsetLoaderPlugin' to 'ProductLoaderPlugin' --- client/ayon_core/pipeline/__init__.py | 4 ++-- client/ayon_core/pipeline/load/__init__.py | 4 ++-- client/ayon_core/pipeline/load/plugins.py | 2 +- .../plugins/load/delete_old_versions.py | 2 +- client/ayon_core/plugins/load/delivery.py | 2 +- client/ayon_core/plugins/load/push_to_library.py | 2 +- client/ayon_core/tools/loader/models/actions.py | 16 ++++++++-------- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/client/ayon_core/pipeline/__init__.py b/client/ayon_core/pipeline/__init__.py index d5813286da..d1a181a353 100644 --- a/client/ayon_core/pipeline/__init__.py +++ b/client/ayon_core/pipeline/__init__.py @@ -31,7 +31,7 @@ from .load import ( HeroVersionType, IncompatibleLoaderError, LoaderPlugin, - SubsetLoaderPlugin, + ProductLoaderPlugin, discover_loader_plugins, register_loader_plugin, @@ -136,7 +136,7 @@ __all__ = ( "HeroVersionType", "IncompatibleLoaderError", "LoaderPlugin", - "SubsetLoaderPlugin", + "ProductLoaderPlugin", "discover_loader_plugins", "register_loader_plugin", diff --git a/client/ayon_core/pipeline/load/__init__.py b/client/ayon_core/pipeline/load/__init__.py index ca11b26211..e955fa72dc 100644 --- a/client/ayon_core/pipeline/load/__init__.py +++ b/client/ayon_core/pipeline/load/__init__.py @@ -41,7 +41,7 @@ from .utils import ( from .plugins import ( LoaderPlugin, - SubsetLoaderPlugin, + ProductLoaderPlugin, discover_loader_plugins, register_loader_plugin, @@ -94,7 +94,7 @@ __all__ = ( # plugins.py "LoaderPlugin", - "SubsetLoaderPlugin", + "ProductLoaderPlugin", "discover_loader_plugins", "register_loader_plugin", diff --git a/client/ayon_core/pipeline/load/plugins.py b/client/ayon_core/pipeline/load/plugins.py index 3b60e357af..90affa3ab2 100644 --- a/client/ayon_core/pipeline/load/plugins.py +++ b/client/ayon_core/pipeline/load/plugins.py @@ -245,7 +245,7 @@ class LoaderPlugin(list): return self._fname -class SubsetLoaderPlugin(LoaderPlugin): +class ProductLoaderPlugin(LoaderPlugin): """Load product into host application Arguments: context (dict): avalon-core:context-1.0 diff --git a/client/ayon_core/plugins/load/delete_old_versions.py b/client/ayon_core/plugins/load/delete_old_versions.py index e0670caee5..74e74b38bd 100644 --- a/client/ayon_core/plugins/load/delete_old_versions.py +++ b/client/ayon_core/plugins/load/delete_old_versions.py @@ -20,7 +20,7 @@ # ) # # -# class DeleteOldVersions(load.SubsetLoaderPlugin): +# class DeleteOldVersions(load.ProductLoaderPlugin): # """Deletes specific number of old version""" # # is_multiple_contexts_compatible = True diff --git a/client/ayon_core/plugins/load/delivery.py b/client/ayon_core/plugins/load/delivery.py index 16f315937b..1de822bb6c 100644 --- a/client/ayon_core/plugins/load/delivery.py +++ b/client/ayon_core/plugins/load/delivery.py @@ -22,7 +22,7 @@ from ayon_core.pipeline.delivery import ( ) -class Delivery(load.SubsetLoaderPlugin): +class Delivery(load.ProductLoaderPlugin): """Export selected versions to folder structure from Template""" is_multiple_contexts_compatible = True diff --git a/client/ayon_core/plugins/load/push_to_library.py b/client/ayon_core/plugins/load/push_to_library.py index 067c652cd9..3fcba3ae7a 100644 --- a/client/ayon_core/plugins/load/push_to_library.py +++ b/client/ayon_core/plugins/load/push_to_library.py @@ -6,7 +6,7 @@ from ayon_core.pipeline import load from ayon_core.pipeline.load import LoadError -class PushToLibraryProject(load.SubsetLoaderPlugin): +class PushToLibraryProject(load.ProductLoaderPlugin): """Export selected versions to folder structure from Template""" is_multiple_contexts_compatible = True diff --git a/client/ayon_core/tools/loader/models/actions.py b/client/ayon_core/tools/loader/models/actions.py index 51a21155c9..7925088b4e 100644 --- a/client/ayon_core/tools/loader/models/actions.py +++ b/client/ayon_core/tools/loader/models/actions.py @@ -14,7 +14,7 @@ from ayon_core.client import ( ) from ayon_core.pipeline.load import ( discover_loader_plugins, - SubsetLoaderPlugin, + ProductLoaderPlugin, filter_repre_contexts_by_loader, get_loader_identifier, load_with_repre_context, @@ -317,7 +317,7 @@ class LoaderActionsModel: we want to show loaders for? Returns: - tuple[list[SubsetLoaderPlugin], list[LoaderPlugin]]: Discovered + tuple[list[ProductLoaderPlugin], list[LoaderPlugin]]: Discovered loader plugins. """ @@ -342,7 +342,7 @@ class LoaderActionsModel: identifier = get_loader_identifier(loader_cls) loaders_by_identifier[identifier] = loader_cls - if issubclass(loader_cls, SubsetLoaderPlugin): + if issubclass(loader_cls, ProductLoaderPlugin): product_loaders.append(loader_cls) else: repre_loaders.append(loader_cls) @@ -404,7 +404,7 @@ class LoaderActionsModel: def _contexts_for_versions(self, project_name, version_ids): """Get contexts for given version ids. - Prepare version contexts for 'SubsetLoaderPlugin' and representation + Prepare version contexts for 'ProductLoaderPlugin' and representation contexts for 'LoaderPlugin' for all children representations of given versions. @@ -483,7 +483,7 @@ class LoaderActionsModel: def _contexts_for_representations(self, project_name, repre_ids): """Get contexts for given representation ids. - Prepare version contexts for 'SubsetLoaderPlugin' and representation + Prepare version contexts for 'ProductLoaderPlugin' and representation contexts for 'LoaderPlugin' for all children representations of given versions. @@ -645,18 +645,18 @@ class LoaderActionsModel: ): """Trigger version loader. - This triggers 'load' method of 'SubsetLoaderPlugin' for given version + This triggers 'load' method of 'ProductLoaderPlugin' for given version ids. Note: - Even when the plugin is 'SubsetLoaderPlugin' it actually expects + Even when the plugin is 'ProductLoaderPlugin' it actually expects versions and should be named 'VersionLoaderPlugin'. Because it is planned to refactor load system and introduce 'LoaderAction' plugins it is not relevant to change it anymore. Args: - loader (SubsetLoaderPlugin): Loader plugin to use. + loader (ProductLoaderPlugin): Loader plugin to use. options (dict): Option values for loader. project_name (str): Project name. version_ids (Iterable[str]): Version ids.