mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
install creator plugins from modules on openpype plugin install
This commit is contained in:
parent
d2afd26ff6
commit
29cbc12ca8
1 changed files with 10 additions and 2 deletions
|
|
@ -12,7 +12,7 @@ import pyblish.api
|
|||
from pyblish.lib import MessageHandler
|
||||
|
||||
import openpype
|
||||
from openpype.modules import load_modules
|
||||
from openpype.modules import load_modules, ModulesManager
|
||||
from openpype.settings import get_project_settings
|
||||
from openpype.lib import (
|
||||
Anatomy,
|
||||
|
|
@ -107,7 +107,7 @@ def install_host(host):
|
|||
install_openpype_plugins()
|
||||
|
||||
|
||||
def install_openpype_plugins(project_name=None):
|
||||
def install_openpype_plugins(project_name=None, host_name=None):
|
||||
# Make sure modules are loaded
|
||||
load_modules()
|
||||
|
||||
|
|
@ -116,6 +116,14 @@ def install_openpype_plugins(project_name=None):
|
|||
pyblish.api.register_discovery_filter(filter_pyblish_plugins)
|
||||
register_loader_plugin_path(LOAD_PATH)
|
||||
|
||||
if host_name is None:
|
||||
host_name = os.environ.get("AVALON_APP")
|
||||
|
||||
modules_manager = ModulesManager()
|
||||
creator_paths = modules_manager.collect_creator_plugin_paths(host_name)
|
||||
for creator_path in creator_paths:
|
||||
register_creator_plugin_path(creator_path)
|
||||
|
||||
if project_name is None:
|
||||
project_name = os.environ.get("AVALON_PROJECT")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue