mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
reuse 'DiscoverResult' from plugin discover
This commit is contained in:
parent
542405775a
commit
86a9c77c1e
3 changed files with 3 additions and 26 deletions
|
|
@ -21,6 +21,7 @@ from openpype.lib.attribute_definitions import (
|
|||
)
|
||||
from openpype.host import IPublishHost
|
||||
from openpype.pipeline import legacy_io
|
||||
from openpype.pipeline.plugin_discover import DiscoverResult
|
||||
|
||||
from .creator_plugins import (
|
||||
Creator,
|
||||
|
|
@ -1620,8 +1621,7 @@ class CreateContext:
|
|||
|
||||
from openpype.pipeline import OpenPypePyblishPluginMixin
|
||||
from openpype.pipeline.publish import (
|
||||
publish_plugins_discover,
|
||||
DiscoverResult
|
||||
publish_plugins_discover
|
||||
)
|
||||
|
||||
# Reset publish plugins
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ from .publish_plugins import (
|
|||
from .lib import (
|
||||
get_publish_template_name,
|
||||
|
||||
DiscoverResult,
|
||||
publish_plugins_discover,
|
||||
load_help_content_from_plugin,
|
||||
load_help_content_from_filepath,
|
||||
|
|
@ -68,7 +67,6 @@ __all__ = (
|
|||
|
||||
"get_publish_template_name",
|
||||
|
||||
"DiscoverResult",
|
||||
"publish_plugins_discover",
|
||||
"load_help_content_from_plugin",
|
||||
"load_help_content_from_filepath",
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ from openpype.settings import (
|
|||
from openpype.pipeline import (
|
||||
tempdir
|
||||
)
|
||||
from openpype.pipeline.plugin_discover import DiscoverResult
|
||||
|
||||
from .contants import (
|
||||
DEFAULT_PUBLISH_TEMPLATE,
|
||||
|
|
@ -202,28 +203,6 @@ def get_publish_template_name(
|
|||
return template or default_template
|
||||
|
||||
|
||||
class DiscoverResult:
|
||||
"""Hold result of publish plugins discovery.
|
||||
|
||||
Stores discovered plugins duplicated plugins and file paths which
|
||||
crashed on execution of file.
|
||||
"""
|
||||
def __init__(self):
|
||||
self.plugins = []
|
||||
self.crashed_file_paths = {}
|
||||
self.duplicated_plugins = []
|
||||
|
||||
def __iter__(self):
|
||||
for plugin in self.plugins:
|
||||
yield plugin
|
||||
|
||||
def __getitem__(self, item):
|
||||
return self.plugins[item]
|
||||
|
||||
def __setitem__(self, item, value):
|
||||
self.plugins[item] = value
|
||||
|
||||
|
||||
class HelpContent:
|
||||
def __init__(self, title, description, detail=None):
|
||||
self.title = title
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue