mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
rename 'SubsetLoaderPlugin' to 'ProductLoaderPlugin'
This commit is contained in:
parent
6afd863fd9
commit
f5e36197eb
7 changed files with 16 additions and 16 deletions
|
|
@ -31,7 +31,7 @@ from .load import (
|
||||||
HeroVersionType,
|
HeroVersionType,
|
||||||
IncompatibleLoaderError,
|
IncompatibleLoaderError,
|
||||||
LoaderPlugin,
|
LoaderPlugin,
|
||||||
SubsetLoaderPlugin,
|
ProductLoaderPlugin,
|
||||||
|
|
||||||
discover_loader_plugins,
|
discover_loader_plugins,
|
||||||
register_loader_plugin,
|
register_loader_plugin,
|
||||||
|
|
@ -136,7 +136,7 @@ __all__ = (
|
||||||
"HeroVersionType",
|
"HeroVersionType",
|
||||||
"IncompatibleLoaderError",
|
"IncompatibleLoaderError",
|
||||||
"LoaderPlugin",
|
"LoaderPlugin",
|
||||||
"SubsetLoaderPlugin",
|
"ProductLoaderPlugin",
|
||||||
|
|
||||||
"discover_loader_plugins",
|
"discover_loader_plugins",
|
||||||
"register_loader_plugin",
|
"register_loader_plugin",
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ from .utils import (
|
||||||
|
|
||||||
from .plugins import (
|
from .plugins import (
|
||||||
LoaderPlugin,
|
LoaderPlugin,
|
||||||
SubsetLoaderPlugin,
|
ProductLoaderPlugin,
|
||||||
|
|
||||||
discover_loader_plugins,
|
discover_loader_plugins,
|
||||||
register_loader_plugin,
|
register_loader_plugin,
|
||||||
|
|
@ -94,7 +94,7 @@ __all__ = (
|
||||||
|
|
||||||
# plugins.py
|
# plugins.py
|
||||||
"LoaderPlugin",
|
"LoaderPlugin",
|
||||||
"SubsetLoaderPlugin",
|
"ProductLoaderPlugin",
|
||||||
|
|
||||||
"discover_loader_plugins",
|
"discover_loader_plugins",
|
||||||
"register_loader_plugin",
|
"register_loader_plugin",
|
||||||
|
|
|
||||||
|
|
@ -245,7 +245,7 @@ class LoaderPlugin(list):
|
||||||
return self._fname
|
return self._fname
|
||||||
|
|
||||||
|
|
||||||
class SubsetLoaderPlugin(LoaderPlugin):
|
class ProductLoaderPlugin(LoaderPlugin):
|
||||||
"""Load product into host application
|
"""Load product into host application
|
||||||
Arguments:
|
Arguments:
|
||||||
context (dict): avalon-core:context-1.0
|
context (dict): avalon-core:context-1.0
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
# )
|
# )
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# class DeleteOldVersions(load.SubsetLoaderPlugin):
|
# class DeleteOldVersions(load.ProductLoaderPlugin):
|
||||||
# """Deletes specific number of old version"""
|
# """Deletes specific number of old version"""
|
||||||
#
|
#
|
||||||
# is_multiple_contexts_compatible = True
|
# is_multiple_contexts_compatible = True
|
||||||
|
|
|
||||||
|
|
@ -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"""
|
"""Export selected versions to folder structure from Template"""
|
||||||
|
|
||||||
is_multiple_contexts_compatible = True
|
is_multiple_contexts_compatible = True
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ from ayon_core.pipeline import load
|
||||||
from ayon_core.pipeline.load import LoadError
|
from ayon_core.pipeline.load import LoadError
|
||||||
|
|
||||||
|
|
||||||
class PushToLibraryProject(load.SubsetLoaderPlugin):
|
class PushToLibraryProject(load.ProductLoaderPlugin):
|
||||||
"""Export selected versions to folder structure from Template"""
|
"""Export selected versions to folder structure from Template"""
|
||||||
|
|
||||||
is_multiple_contexts_compatible = True
|
is_multiple_contexts_compatible = True
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ from ayon_core.client import (
|
||||||
)
|
)
|
||||||
from ayon_core.pipeline.load import (
|
from ayon_core.pipeline.load import (
|
||||||
discover_loader_plugins,
|
discover_loader_plugins,
|
||||||
SubsetLoaderPlugin,
|
ProductLoaderPlugin,
|
||||||
filter_repre_contexts_by_loader,
|
filter_repre_contexts_by_loader,
|
||||||
get_loader_identifier,
|
get_loader_identifier,
|
||||||
load_with_repre_context,
|
load_with_repre_context,
|
||||||
|
|
@ -317,7 +317,7 @@ class LoaderActionsModel:
|
||||||
we want to show loaders for?
|
we want to show loaders for?
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
tuple[list[SubsetLoaderPlugin], list[LoaderPlugin]]: Discovered
|
tuple[list[ProductLoaderPlugin], list[LoaderPlugin]]: Discovered
|
||||||
loader plugins.
|
loader plugins.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
@ -342,7 +342,7 @@ class LoaderActionsModel:
|
||||||
|
|
||||||
identifier = get_loader_identifier(loader_cls)
|
identifier = get_loader_identifier(loader_cls)
|
||||||
loaders_by_identifier[identifier] = loader_cls
|
loaders_by_identifier[identifier] = loader_cls
|
||||||
if issubclass(loader_cls, SubsetLoaderPlugin):
|
if issubclass(loader_cls, ProductLoaderPlugin):
|
||||||
product_loaders.append(loader_cls)
|
product_loaders.append(loader_cls)
|
||||||
else:
|
else:
|
||||||
repre_loaders.append(loader_cls)
|
repre_loaders.append(loader_cls)
|
||||||
|
|
@ -404,7 +404,7 @@ class LoaderActionsModel:
|
||||||
def _contexts_for_versions(self, project_name, version_ids):
|
def _contexts_for_versions(self, project_name, version_ids):
|
||||||
"""Get contexts for given 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
|
contexts for 'LoaderPlugin' for all children representations of
|
||||||
given versions.
|
given versions.
|
||||||
|
|
||||||
|
|
@ -483,7 +483,7 @@ class LoaderActionsModel:
|
||||||
def _contexts_for_representations(self, project_name, repre_ids):
|
def _contexts_for_representations(self, project_name, repre_ids):
|
||||||
"""Get contexts for given representation 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
|
contexts for 'LoaderPlugin' for all children representations of
|
||||||
given versions.
|
given versions.
|
||||||
|
|
||||||
|
|
@ -645,18 +645,18 @@ class LoaderActionsModel:
|
||||||
):
|
):
|
||||||
"""Trigger version loader.
|
"""Trigger version loader.
|
||||||
|
|
||||||
This triggers 'load' method of 'SubsetLoaderPlugin' for given version
|
This triggers 'load' method of 'ProductLoaderPlugin' for given version
|
||||||
ids.
|
ids.
|
||||||
|
|
||||||
Note:
|
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
|
versions and should be named 'VersionLoaderPlugin'. Because it
|
||||||
is planned to refactor load system and introduce
|
is planned to refactor load system and introduce
|
||||||
'LoaderAction' plugins it is not relevant to change it
|
'LoaderAction' plugins it is not relevant to change it
|
||||||
anymore.
|
anymore.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
loader (SubsetLoaderPlugin): Loader plugin to use.
|
loader (ProductLoaderPlugin): Loader plugin to use.
|
||||||
options (dict): Option values for loader.
|
options (dict): Option values for loader.
|
||||||
project_name (str): Project name.
|
project_name (str): Project name.
|
||||||
version_ids (Iterable[str]): Version ids.
|
version_ids (Iterable[str]): Version ids.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue