From 4f7d99babeee9a5a309b009e805877d70feec8a6 Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Tue, 15 Mar 2022 14:15:35 +0100 Subject: [PATCH] remove plural from de/register_loader_plugins_path --- openpype/__init__.py | 10 +++++----- openpype/hosts/aftereffects/api/pipeline.py | 8 ++++---- openpype/hosts/blender/api/pipeline.py | 8 ++++---- openpype/hosts/flame/api/pipeline.py | 8 ++++---- openpype/hosts/fusion/api/pipeline.py | 8 ++++---- openpype/hosts/harmony/api/pipeline.py | 8 ++++---- openpype/hosts/hiero/api/pipeline.py | 8 ++++---- openpype/hosts/houdini/api/pipeline.py | 4 ++-- openpype/hosts/maya/api/pipeline.py | 8 ++++---- openpype/hosts/nuke/api/pipeline.py | 8 ++++---- openpype/hosts/photoshop/api/pipeline.py | 8 ++++---- openpype/hosts/resolve/api/pipeline.py | 8 ++++---- openpype/hosts/tvpaint/api/pipeline.py | 8 ++++---- openpype/hosts/unreal/api/pipeline.py | 8 ++++---- openpype/pipeline/__init__.py | 8 ++++---- openpype/pipeline/load/__init__.py | 8 ++++---- openpype/pipeline/load/plugins.py | 4 ++-- 17 files changed, 65 insertions(+), 65 deletions(-) diff --git a/openpype/__init__.py b/openpype/__init__.py index 0df1b7270f..99629a4257 100644 --- a/openpype/__init__.py +++ b/openpype/__init__.py @@ -77,7 +77,7 @@ def install(): from openpype.modules import load_modules from openpype.pipeline import ( LegacyCreator, - register_loader_plugins_path, + register_loader_plugin_path, ) from avalon import pipeline @@ -94,7 +94,7 @@ def install(): log.info("Registering global plug-ins..") pyblish.register_plugin_path(PUBLISH_PATH) pyblish.register_discovery_filter(filter_pyblish_plugins) - register_loader_plugins_path(LOAD_PATH) + register_loader_plugin_path(LOAD_PATH) project_name = os.environ.get("AVALON_PROJECT") @@ -122,7 +122,7 @@ def install(): continue pyblish.register_plugin_path(path) - register_loader_plugins_path(path) + register_loader_plugin_path(path) avalon.register_plugin_path(LegacyCreator, path) avalon.register_plugin_path(avalon.InventoryAction, path) @@ -142,12 +142,12 @@ def _on_task_change(): @import_wrapper def uninstall(): """Uninstall Pype from Avalon.""" - from openpype.pipeline import deregister_loader_plugins_path + from openpype.pipeline import deregister_loader_plugin_path log.info("Deregistering global plug-ins..") pyblish.deregister_plugin_path(PUBLISH_PATH) pyblish.deregister_discovery_filter(filter_pyblish_plugins) - deregister_loader_plugins_path(LOAD_PATH) + deregister_loader_plugin_path(LOAD_PATH) log.info("Global plug-ins unregistred") # restore original discover diff --git a/openpype/hosts/aftereffects/api/pipeline.py b/openpype/hosts/aftereffects/api/pipeline.py index 8961599149..681f1c51a7 100644 --- a/openpype/hosts/aftereffects/api/pipeline.py +++ b/openpype/hosts/aftereffects/api/pipeline.py @@ -11,8 +11,8 @@ from openpype import lib from openpype.api import Logger from openpype.pipeline import ( LegacyCreator, - register_loader_plugins_path, - deregister_loader_plugins_path, + register_loader_plugin_path, + deregister_loader_plugin_path, ) import openpype.hosts.aftereffects from openpype.lib import register_event_callback @@ -71,7 +71,7 @@ def install(): pyblish.api.register_host("aftereffects") pyblish.api.register_plugin_path(PUBLISH_PATH) - register_loader_plugins_path(LOAD_PATH) + register_loader_plugin_path(LOAD_PATH) avalon.api.register_plugin_path(LegacyCreator, CREATE_PATH) log.info(PUBLISH_PATH) @@ -84,7 +84,7 @@ def install(): def uninstall(): pyblish.api.deregister_plugin_path(PUBLISH_PATH) - deregister_loader_plugins_path(LOAD_PATH) + deregister_loader_plugin_path(LOAD_PATH) avalon.api.deregister_plugin_path(LegacyCreator, CREATE_PATH) diff --git a/openpype/hosts/blender/api/pipeline.py b/openpype/hosts/blender/api/pipeline.py index 64fb135d89..07a7509dd7 100644 --- a/openpype/hosts/blender/api/pipeline.py +++ b/openpype/hosts/blender/api/pipeline.py @@ -16,8 +16,8 @@ from avalon.pipeline import AVALON_CONTAINER_ID from openpype.pipeline import ( LegacyCreator, - register_loader_plugins_path, - deregister_loader_plugins_path, + register_loader_plugin_path, + deregister_loader_plugin_path, ) from openpype.api import Logger from openpype.lib import ( @@ -54,7 +54,7 @@ def install(): pyblish.api.register_host("blender") pyblish.api.register_plugin_path(str(PUBLISH_PATH)) - register_loader_plugins_path(str(LOAD_PATH)) + register_loader_plugin_path(str(LOAD_PATH)) avalon.api.register_plugin_path(LegacyCreator, str(CREATE_PATH)) lib.append_user_scripts() @@ -76,7 +76,7 @@ def uninstall(): pyblish.api.deregister_host("blender") pyblish.api.deregister_plugin_path(str(PUBLISH_PATH)) - deregister_loader_plugins_path(str(LOAD_PATH)) + deregister_loader_plugin_path(str(LOAD_PATH)) avalon.api.deregister_plugin_path(LegacyCreator, str(CREATE_PATH)) if not IS_HEADLESS: diff --git a/openpype/hosts/flame/api/pipeline.py b/openpype/hosts/flame/api/pipeline.py index 6a045214c3..930c6abe29 100644 --- a/openpype/hosts/flame/api/pipeline.py +++ b/openpype/hosts/flame/api/pipeline.py @@ -9,8 +9,8 @@ from pyblish import api as pyblish from openpype.api import Logger from openpype.pipeline import ( LegacyCreator, - register_loader_plugins_path, - deregister_loader_plugins_path, + register_loader_plugin_path, + deregister_loader_plugin_path, ) from .lib import ( set_segment_data_marker, @@ -37,7 +37,7 @@ def install(): pyblish.register_host("flame") pyblish.register_plugin_path(PUBLISH_PATH) - register_loader_plugins_path(LOAD_PATH) + register_loader_plugin_path(LOAD_PATH) avalon.register_plugin_path(LegacyCreator, CREATE_PATH) avalon.register_plugin_path(avalon.InventoryAction, INVENTORY_PATH) log.info("OpenPype Flame plug-ins registred ...") @@ -52,7 +52,7 @@ def uninstall(): log.info("Deregistering Flame plug-ins..") pyblish.deregister_plugin_path(PUBLISH_PATH) - deregister_loader_plugins_path(LOAD_PATH) + deregister_loader_plugin_path(LOAD_PATH) avalon.deregister_plugin_path(LegacyCreator, CREATE_PATH) avalon.deregister_plugin_path(avalon.InventoryAction, INVENTORY_PATH) diff --git a/openpype/hosts/fusion/api/pipeline.py b/openpype/hosts/fusion/api/pipeline.py index 3f5da7fcc7..92e54ad6f5 100644 --- a/openpype/hosts/fusion/api/pipeline.py +++ b/openpype/hosts/fusion/api/pipeline.py @@ -13,8 +13,8 @@ from avalon.pipeline import AVALON_CONTAINER_ID from openpype.api import Logger from openpype.pipeline import ( LegacyCreator, - register_loader_plugins_path, - deregister_loader_plugins_path, + register_loader_plugin_path, + deregister_loader_plugin_path, ) import openpype.hosts.fusion @@ -67,7 +67,7 @@ def install(): pyblish.api.register_plugin_path(PUBLISH_PATH) log.info("Registering Fusion plug-ins..") - register_loader_plugins_path(LOAD_PATH) + register_loader_plugin_path(LOAD_PATH) avalon.api.register_plugin_path(LegacyCreator, CREATE_PATH) avalon.api.register_plugin_path(avalon.api.InventoryAction, INVENTORY_PATH) @@ -91,7 +91,7 @@ def uninstall(): pyblish.api.deregister_plugin_path(PUBLISH_PATH) log.info("Deregistering Fusion plug-ins..") - deregister_loader_plugins_path(LOAD_PATH) + deregister_loader_plugin_path(LOAD_PATH) avalon.api.deregister_plugin_path(LegacyCreator, CREATE_PATH) avalon.api.deregister_plugin_path( avalon.api.InventoryAction, INVENTORY_PATH diff --git a/openpype/hosts/harmony/api/pipeline.py b/openpype/hosts/harmony/api/pipeline.py index b9d2e78bce..f967da15ca 100644 --- a/openpype/hosts/harmony/api/pipeline.py +++ b/openpype/hosts/harmony/api/pipeline.py @@ -12,8 +12,8 @@ from openpype import lib from openpype.lib import register_event_callback from openpype.pipeline import ( LegacyCreator, - register_loader_plugins_path, - deregister_loader_plugins_path, + register_loader_plugin_path, + deregister_loader_plugin_path, ) import openpype.hosts.harmony import openpype.hosts.harmony.api as harmony @@ -184,7 +184,7 @@ def install(): pyblish.api.register_host("harmony") pyblish.api.register_plugin_path(PUBLISH_PATH) - register_loader_plugins_path(LOAD_PATH) + register_loader_plugin_path(LOAD_PATH) avalon.api.register_plugin_path(LegacyCreator, CREATE_PATH) log.info(PUBLISH_PATH) @@ -198,7 +198,7 @@ def install(): def uninstall(): pyblish.api.deregister_plugin_path(PUBLISH_PATH) - deregister_loader_plugins_path(LOAD_PATH) + deregister_loader_plugin_path(LOAD_PATH) avalon.api.deregister_plugin_path(LegacyCreator, CREATE_PATH) diff --git a/openpype/hosts/hiero/api/pipeline.py b/openpype/hosts/hiero/api/pipeline.py index f27b7a4f81..eff126c0b6 100644 --- a/openpype/hosts/hiero/api/pipeline.py +++ b/openpype/hosts/hiero/api/pipeline.py @@ -11,8 +11,8 @@ from pyblish import api as pyblish from openpype.api import Logger from openpype.pipeline import ( LegacyCreator, - register_loader_plugins_path, - deregister_loader_plugins_path, + register_loader_plugin_path, + deregister_loader_plugin_path, ) from openpype.tools.utils import host_tools from . import lib, menu, events @@ -49,7 +49,7 @@ def install(): log.info("Registering Hiero plug-ins..") pyblish.register_host("hiero") pyblish.register_plugin_path(PUBLISH_PATH) - register_loader_plugins_path(LOAD_PATH) + register_loader_plugin_path(LOAD_PATH) avalon.register_plugin_path(LegacyCreator, CREATE_PATH) avalon.register_plugin_path(avalon.InventoryAction, INVENTORY_PATH) @@ -71,7 +71,7 @@ def uninstall(): log.info("Deregistering Hiero plug-ins..") pyblish.deregister_host("hiero") pyblish.deregister_plugin_path(PUBLISH_PATH) - deregister_loader_plugins_path(LOAD_PATH) + deregister_loader_plugin_path(LOAD_PATH) avalon.deregister_plugin_path(LegacyCreator, CREATE_PATH) # register callback for switching publishable diff --git a/openpype/hosts/houdini/api/pipeline.py b/openpype/hosts/houdini/api/pipeline.py index eb1bdafbb0..7d4e58efb7 100644 --- a/openpype/hosts/houdini/api/pipeline.py +++ b/openpype/hosts/houdini/api/pipeline.py @@ -13,7 +13,7 @@ from avalon.lib import find_submodule from openpype.pipeline import ( LegacyCreator, - register_loader_plugins_path, + register_loader_plugin_path, ) import openpype.hosts.houdini from openpype.hosts.houdini.api import lib @@ -53,7 +53,7 @@ def install(): pyblish.api.register_host("hpython") pyblish.api.register_plugin_path(PUBLISH_PATH) - register_loader_plugins_path(LOAD_PATH) + register_loader_plugin_path(LOAD_PATH) avalon.api.register_plugin_path(LegacyCreator, CREATE_PATH) log.info("Installing callbacks ... ") diff --git a/openpype/hosts/maya/api/pipeline.py b/openpype/hosts/maya/api/pipeline.py index ae8b36f9d3..5cdc3ff4fd 100644 --- a/openpype/hosts/maya/api/pipeline.py +++ b/openpype/hosts/maya/api/pipeline.py @@ -22,8 +22,8 @@ from openpype.lib import ( from openpype.lib.path_tools import HostDirmap from openpype.pipeline import ( LegacyCreator, - register_loader_plugins_path, - deregister_loader_plugins_path, + register_loader_plugin_path, + deregister_loader_plugin_path, ) from openpype.hosts.maya.lib import copy_workspace_mel from . import menu, lib @@ -57,7 +57,7 @@ def install(): pyblish.api.register_host("mayapy") pyblish.api.register_host("maya") - register_loader_plugins_path(LOAD_PATH) + register_loader_plugin_path(LOAD_PATH) avalon.api.register_plugin_path(LegacyCreator, CREATE_PATH) avalon.api.register_plugin_path(avalon.api.InventoryAction, INVENTORY_PATH) log.info(PUBLISH_PATH) @@ -186,7 +186,7 @@ def uninstall(): pyblish.api.deregister_host("mayapy") pyblish.api.deregister_host("maya") - deregister_loader_plugins_path(LOAD_PATH) + deregister_loader_plugin_path(LOAD_PATH) avalon.api.deregister_plugin_path(LegacyCreator, CREATE_PATH) avalon.api.deregister_plugin_path( avalon.api.InventoryAction, INVENTORY_PATH diff --git a/openpype/hosts/nuke/api/pipeline.py b/openpype/hosts/nuke/api/pipeline.py index cecd129eac..fd2e16b8d3 100644 --- a/openpype/hosts/nuke/api/pipeline.py +++ b/openpype/hosts/nuke/api/pipeline.py @@ -17,8 +17,8 @@ from openpype.api import ( from openpype.lib import register_event_callback from openpype.pipeline import ( LegacyCreator, - register_loader_plugins_path, - deregister_loader_plugins_path, + register_loader_plugin_path, + deregister_loader_plugin_path, ) from openpype.tools.utils import host_tools @@ -103,7 +103,7 @@ def install(): log.info("Registering Nuke plug-ins..") pyblish.api.register_plugin_path(PUBLISH_PATH) - register_loader_plugins_path(LOAD_PATH) + register_loader_plugin_path(LOAD_PATH) avalon.api.register_plugin_path(LegacyCreator, CREATE_PATH) avalon.api.register_plugin_path(avalon.api.InventoryAction, INVENTORY_PATH) @@ -129,7 +129,7 @@ def uninstall(): log.info("Deregistering Nuke plug-ins..") pyblish.deregister_host("nuke") pyblish.api.deregister_plugin_path(PUBLISH_PATH) - deregister_loader_plugins_path(LOAD_PATH) + deregister_loader_plugin_path(LOAD_PATH) avalon.api.deregister_plugin_path(LegacyCreator, CREATE_PATH) pyblish.api.deregister_callback( diff --git a/openpype/hosts/photoshop/api/pipeline.py b/openpype/hosts/photoshop/api/pipeline.py index 85155f45d6..e814e1ca4d 100644 --- a/openpype/hosts/photoshop/api/pipeline.py +++ b/openpype/hosts/photoshop/api/pipeline.py @@ -9,8 +9,8 @@ from openpype.api import Logger from openpype.lib import register_event_callback from openpype.pipeline import ( LegacyCreator, - register_loader_plugins_path, - deregister_loader_plugins_path, + register_loader_plugin_path, + deregister_loader_plugin_path, ) import openpype.hosts.photoshop @@ -72,7 +72,7 @@ def install(): pyblish.api.register_host("photoshop") pyblish.api.register_plugin_path(PUBLISH_PATH) - register_loader_plugins_path(LOAD_PATH) + register_loader_plugin_path(LOAD_PATH) avalon.api.register_plugin_path(LegacyCreator, CREATE_PATH) log.info(PUBLISH_PATH) @@ -85,7 +85,7 @@ def install(): def uninstall(): pyblish.api.deregister_plugin_path(PUBLISH_PATH) - deregister_loader_plugins_path(LOAD_PATH) + deregister_loader_plugin_path(LOAD_PATH) avalon.api.deregister_plugin_path(LegacyCreator, CREATE_PATH) diff --git a/openpype/hosts/resolve/api/pipeline.py b/openpype/hosts/resolve/api/pipeline.py index 829794dd41..fa309e3503 100644 --- a/openpype/hosts/resolve/api/pipeline.py +++ b/openpype/hosts/resolve/api/pipeline.py @@ -11,8 +11,8 @@ from pyblish import api as pyblish from openpype.api import Logger from openpype.pipeline import ( LegacyCreator, - register_loader_plugins_path, - deregister_loader_plugins_path, + register_loader_plugin_path, + deregister_loader_plugin_path, ) from . import lib from . import PLUGINS_DIR @@ -46,7 +46,7 @@ def install(): pyblish.register_plugin_path(PUBLISH_PATH) log.info("Registering DaVinci Resovle plug-ins..") - register_loader_plugins_path(LOAD_PATH) + register_loader_plugin_path(LOAD_PATH) avalon.register_plugin_path(LegacyCreator, CREATE_PATH) avalon.register_plugin_path(avalon.InventoryAction, INVENTORY_PATH) @@ -71,7 +71,7 @@ def uninstall(): pyblish.deregister_plugin_path(PUBLISH_PATH) log.info("Deregistering DaVinci Resovle plug-ins..") - deregister_loader_plugins_path(LOAD_PATH) + deregister_loader_plugin_path(LOAD_PATH) avalon.deregister_plugin_path(LegacyCreator, CREATE_PATH) avalon.deregister_plugin_path(avalon.InventoryAction, INVENTORY_PATH) diff --git a/openpype/hosts/tvpaint/api/pipeline.py b/openpype/hosts/tvpaint/api/pipeline.py index 46981851f4..46c9d3a1dd 100644 --- a/openpype/hosts/tvpaint/api/pipeline.py +++ b/openpype/hosts/tvpaint/api/pipeline.py @@ -17,8 +17,8 @@ from openpype.api import get_current_project_settings from openpype.lib import register_event_callback from openpype.pipeline import ( LegacyCreator, - register_loader_plugins_path, - deregister_loader_plugins_path, + register_loader_plugin_path, + deregister_loader_plugin_path, ) from .lib import ( @@ -81,7 +81,7 @@ def install(): pyblish.api.register_host("tvpaint") pyblish.api.register_plugin_path(PUBLISH_PATH) - register_loader_plugins_path(LOAD_PATH) + register_loader_plugin_path(LOAD_PATH) avalon.api.register_plugin_path(LegacyCreator, CREATE_PATH) registered_callbacks = ( @@ -103,7 +103,7 @@ def uninstall(): log.info("OpenPype - Uninstalling TVPaint integration") pyblish.api.deregister_host("tvpaint") pyblish.api.deregister_plugin_path(PUBLISH_PATH) - deregister_loader_plugins_path(LOAD_PATH) + deregister_loader_plugin_path(LOAD_PATH) avalon.api.deregister_plugin_path(LegacyCreator, CREATE_PATH) diff --git a/openpype/hosts/unreal/api/pipeline.py b/openpype/hosts/unreal/api/pipeline.py index 7100ff3a83..9ec11b942d 100644 --- a/openpype/hosts/unreal/api/pipeline.py +++ b/openpype/hosts/unreal/api/pipeline.py @@ -9,8 +9,8 @@ from avalon import api from openpype.pipeline import ( LegacyCreator, - register_loader_plugins_path, - deregister_loader_plugins_path, + register_loader_plugin_path, + deregister_loader_plugin_path, ) from openpype.tools.utils import host_tools import openpype.hosts.unreal @@ -48,7 +48,7 @@ def install(): print("-=" * 40) logger.info("installing OpenPype for Unreal") pyblish.api.register_plugin_path(str(PUBLISH_PATH)) - register_loader_plugins_path(str(LOAD_PATH)) + register_loader_plugin_path(str(LOAD_PATH)) api.register_plugin_path(LegacyCreator, str(CREATE_PATH)) _register_callbacks() _register_events() @@ -57,7 +57,7 @@ def install(): def uninstall(): """Uninstall Unreal configuration for Avalon.""" pyblish.api.deregister_plugin_path(str(PUBLISH_PATH)) - deregister_loader_plugins_path(str(LOAD_PATH)) + deregister_loader_plugin_path(str(LOAD_PATH)) api.deregister_plugin_path(LegacyCreator, str(CREATE_PATH)) diff --git a/openpype/pipeline/__init__.py b/openpype/pipeline/__init__.py index 3ff3638a23..e204eea239 100644 --- a/openpype/pipeline/__init__.py +++ b/openpype/pipeline/__init__.py @@ -20,8 +20,8 @@ from .load import ( discover_loader_plugins, register_loader_plugin, - deregister_loader_plugins_path, - register_loader_plugins_path, + deregister_loader_plugin_path, + register_loader_plugin_path, deregister_loader_plugin, load_container, @@ -64,8 +64,8 @@ __all__ = ( "discover_loader_plugins", "register_loader_plugin", - "deregister_loader_plugins_path", - "register_loader_plugins_path", + "deregister_loader_plugin_path", + "register_loader_plugin_path", "deregister_loader_plugin", "load_container", diff --git a/openpype/pipeline/load/__init__.py b/openpype/pipeline/load/__init__.py index eac303c10c..6e7612d4c1 100644 --- a/openpype/pipeline/load/__init__.py +++ b/openpype/pipeline/load/__init__.py @@ -32,8 +32,8 @@ from .plugins import ( discover_loader_plugins, register_loader_plugin, - deregister_loader_plugins_path, - register_loader_plugins_path, + deregister_loader_plugin_path, + register_loader_plugin_path, deregister_loader_plugin, ) @@ -72,7 +72,7 @@ __all__ = ( "discover_loader_plugins", "register_loader_plugin", - "deregister_loader_plugins_path", - "register_loader_plugins_path", + "deregister_loader_plugin_path", + "register_loader_plugin_path", "deregister_loader_plugin", ) diff --git a/openpype/pipeline/load/plugins.py b/openpype/pipeline/load/plugins.py index 5648236739..601ad3b258 100644 --- a/openpype/pipeline/load/plugins.py +++ b/openpype/pipeline/load/plugins.py @@ -113,13 +113,13 @@ def register_loader_plugin(plugin): return avalon.api.register_plugin(LoaderPlugin, plugin) -def deregister_loader_plugins_path(path): +def deregister_loader_plugin_path(path): import avalon.api avalon.api.deregister_plugin_path(LoaderPlugin, path) -def register_loader_plugins_path(path): +def register_loader_plugin_path(path): import avalon.api return avalon.api.register_plugin_path(LoaderPlugin, path)