Merge pull request #2368 from pypeclub/feature/modules_hierarchy_vol2
General: Default modules hierarchy n2
|
|
@ -29,6 +29,21 @@ from openpype.settings.lib import (
|
|||
from openpype.lib import PypeLogger
|
||||
|
||||
|
||||
DEFAULT_OPENPYPE_MODULES = (
|
||||
"avalon_apps",
|
||||
"clockify",
|
||||
"log_viewer",
|
||||
"muster",
|
||||
"python_console_interpreter",
|
||||
"slack",
|
||||
"webserver",
|
||||
"launcher_action",
|
||||
"project_manager_action",
|
||||
"settings_action",
|
||||
"standalonepublish_action",
|
||||
)
|
||||
|
||||
|
||||
# Inherit from `object` for Python 2 hosts
|
||||
class _ModuleClass(object):
|
||||
"""Fake module class for storing OpenPype modules.
|
||||
|
|
@ -272,17 +287,12 @@ def _load_modules():
|
|||
log = PypeLogger.get_logger("ModulesLoader")
|
||||
|
||||
# Import default modules imported from 'openpype.modules'
|
||||
for default_module_name in (
|
||||
"settings_action",
|
||||
"launcher_action",
|
||||
"project_manager_action",
|
||||
"standalonepublish_action",
|
||||
):
|
||||
for default_module_name in DEFAULT_OPENPYPE_MODULES:
|
||||
try:
|
||||
default_module = __import__(
|
||||
"openpype.modules.{}".format(default_module_name),
|
||||
fromlist=("", )
|
||||
)
|
||||
import_str = "openpype.modules.{}".format(default_module_name)
|
||||
new_import_str = "{}.{}".format(modules_key, default_module_name)
|
||||
default_module = __import__(import_str, fromlist=("", ))
|
||||
sys.modules[new_import_str] = default_module
|
||||
setattr(openpype_modules, default_module_name, default_module)
|
||||
|
||||
except Exception:
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 673 B After Width: | Height: | Size: 673 B |
|
Before Width: | Height: | Size: 756 B After Width: | Height: | Size: 756 B |
|
Before Width: | Height: | Size: 829 B After Width: | Height: | Size: 829 B |
|
Before Width: | Height: | Size: 641 B After Width: | Height: | Size: 641 B |
|
Before Width: | Height: | Size: 222 B After Width: | Height: | Size: 222 B |
|
Before Width: | Height: | Size: 202 B After Width: | Height: | Size: 202 B |
|
Before Width: | Height: | Size: 286 B After Width: | Height: | Size: 286 B |
|
Before Width: | Height: | Size: 90 B After Width: | Height: | Size: 90 B |
|
Before Width: | Height: | Size: 90 B After Width: | Height: | Size: 90 B |
|
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 214 B |
|
Before Width: | Height: | Size: 203 B After Width: | Height: | Size: 203 B |