load global plugins from pype/plugins/plugintype

This commit is contained in:
Milan Kolar 2021-02-16 18:24:32 +01:00
parent e91304129f
commit 282a0ea301
2 changed files with 3 additions and 4 deletions

View file

@ -18,8 +18,8 @@ PACKAGE_DIR = os.path.dirname(os.path.abspath(__file__))
PLUGINS_DIR = os.path.join(PACKAGE_DIR, "plugins")
# Global plugin paths
PUBLISH_PATH = os.path.join(PLUGINS_DIR, "global", "publish")
LOAD_PATH = os.path.join(PLUGINS_DIR, "global", "load")
PUBLISH_PATH = os.path.join(PLUGINS_DIR, "publish")
LOAD_PATH = os.path.join(PLUGINS_DIR, "load")
def import_wrapper(func):

View file

@ -41,13 +41,12 @@ def filter_pyblish_plugins(plugins):
file = os.path.normpath(inspect.getsourcefile(plugin))
file = os.path.normpath(file)
# host determined from path
host_from_file = file.split(os.path.sep)[-4:-3][0]
plugin_kind = file.split(os.path.sep)[-2:-1][0]
# TODO: change after all plugins are moved one level up
if host_from_file == "plugins":
if host_from_file == "pype":
host_from_file = "global"
try: