mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Register studio plugins with PYPE_STUDIO_PLUGINS
This commit is contained in:
parent
a734ade82e
commit
8858c38491
1 changed files with 15 additions and 0 deletions
|
|
@ -11,6 +11,7 @@ log = logging.getLogger(__name__)
|
|||
|
||||
|
||||
PROJECT_PLUGINS_PATH = os.environ.get("PYPE_PROJECT_PLUGINS")
|
||||
STUDIO_PLUGINS_PATH = os.environ.get("PYPE_STUDIO_PLUGINS")
|
||||
PACKAGE_DIR = os.path.dirname(__file__)
|
||||
PLUGINS_DIR = os.path.join(PACKAGE_DIR, "plugins")
|
||||
|
||||
|
|
@ -83,6 +84,20 @@ def install():
|
|||
pyblish.register_plugin_path(plugin_path)
|
||||
avalon.register_plugin_path(avalon.Loader, plugin_path)
|
||||
avalon.register_plugin_path(avalon.Creator, plugin_path)
|
||||
avalon.register_plugin_path(
|
||||
avalon.InventoryAction, plugin_path
|
||||
)
|
||||
|
||||
# Register studio specific plugins
|
||||
if STUDIO_PLUGINS_PATH and project_name:
|
||||
for path in STUDIO_PLUGINS_PATH.split(os.pathsep):
|
||||
if not path:
|
||||
continue
|
||||
if os.path.exists(path):
|
||||
pyblish.register_plugin_path(path)
|
||||
avalon.register_plugin_path(avalon.Loader, path)
|
||||
avalon.register_plugin_path(avalon.Creator, path)
|
||||
avalon.register_plugin_path(avalon.InventoryAction, path)
|
||||
|
||||
# apply monkey patched discover to original one
|
||||
avalon.discover = patched_discover
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue