From b17815dc1b796635eb29fbe24cd54c96baffb619 Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Tue, 6 Feb 2024 18:14:28 +0100 Subject: [PATCH] implemented 'install_ayon_plugins' as replacement of 'install_openpype_plugins' --- client/ayon_core/cli_commands.py | 4 ++-- client/ayon_core/hosts/celaction/scripts/publish_cli.py | 4 ++-- client/ayon_core/modules/library_loader_action.py | 4 ++-- client/ayon_core/pipeline/__init__.py | 2 ++ client/ayon_core/pipeline/context_tools.py | 6 +++++- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/client/ayon_core/cli_commands.py b/client/ayon_core/cli_commands.py index 08a55468a0..cd21a6c4c6 100644 --- a/client/ayon_core/cli_commands.py +++ b/client/ayon_core/cli_commands.py @@ -63,7 +63,7 @@ class Commands: ) from ayon_core.addon import AddonsManager from ayon_core.pipeline import ( - install_openpype_plugins, + install_ayon_plugins, get_global_context, ) from ayon_core.tools.utils.host_tools import show_publish @@ -75,7 +75,7 @@ class Commands: log = Logger.get_logger("CLI-publish") - install_openpype_plugins() + install_ayon_plugins() manager = AddonsManager() diff --git a/client/ayon_core/hosts/celaction/scripts/publish_cli.py b/client/ayon_core/hosts/celaction/scripts/publish_cli.py index d8c5146333..92019b8702 100644 --- a/client/ayon_core/hosts/celaction/scripts/publish_cli.py +++ b/client/ayon_core/hosts/celaction/scripts/publish_cli.py @@ -7,7 +7,7 @@ import pyblish.util import ayon_core.hosts.celaction from ayon_core.lib import Logger from ayon_core.tools.utils import host_tools -from ayon_core.pipeline import install_openpype_plugins +from ayon_core.pipeline import install_ayon_plugins log = Logger.get_logger("celaction") @@ -20,7 +20,7 @@ PUBLISH_PATH = os.path.join(PLUGINS_DIR, "publish") def main(): # Registers pype's Global pyblish plugins - install_openpype_plugins() + install_ayon_plugins() if os.path.exists(PUBLISH_PATH): log.info(f"Registering path: {PUBLISH_PATH}") diff --git a/client/ayon_core/modules/library_loader_action.py b/client/ayon_core/modules/library_loader_action.py index 1f42c47666..524c4f7144 100644 --- a/client/ayon_core/modules/library_loader_action.py +++ b/client/ayon_core/modules/library_loader_action.py @@ -45,11 +45,11 @@ class LibraryLoaderAddon(AYONAddon, ITrayModule): def show_library_loader(self): if self._library_loader_window is None: - from ayon_core.pipeline import install_openpype_plugins + from ayon_core.pipeline import install_ayon_plugins self._init_library_loader() - install_openpype_plugins() + install_ayon_plugins() self._library_loader_window.show() diff --git a/client/ayon_core/pipeline/__init__.py b/client/ayon_core/pipeline/__init__.py index d2418eb5fb..633d164a3d 100644 --- a/client/ayon_core/pipeline/__init__.py +++ b/client/ayon_core/pipeline/__init__.py @@ -73,6 +73,7 @@ from .actions import ( ) from .context_tools import ( + install_ayon_plugins, install_openpype_plugins, install_host, uninstall_host, @@ -170,6 +171,7 @@ __all__ = ( "deregister_inventory_action_path", # --- Process context --- + "install_ayon_plugins", "install_openpype_plugins", "install_host", "uninstall_host", diff --git a/client/ayon_core/pipeline/context_tools.py b/client/ayon_core/pipeline/context_tools.py index 07ea8d318b..9773da2529 100644 --- a/client/ayon_core/pipeline/context_tools.py +++ b/client/ayon_core/pipeline/context_tools.py @@ -168,7 +168,7 @@ def install_host(host): install_openpype_plugins(project_name, host_name) -def install_openpype_plugins(project_name=None, host_name=None): +def install_ayon_plugins(project_name=None, host_name=None): # Make sure modules are loaded load_addons() @@ -234,6 +234,10 @@ def install_openpype_plugins(project_name=None, host_name=None): register_inventory_action_path(path) +def install_openpype_plugins(project_name=None, host_name=None): + install_ayon_plugins(project_name, host_name) + + def uninstall_host(): """Undo all of what `install()` did""" host = registered_host()