mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
renamed 'IHostModule' to 'IHostAddon'
This commit is contained in:
parent
52fdba85da
commit
2bfa9eea44
14 changed files with 31 additions and 31 deletions
|
|
@ -1,8 +1,8 @@
|
|||
from openpype.modules import OpenPypeModule
|
||||
from openpype.modules.interfaces import IHostModule
|
||||
from openpype.modules.interfaces import IHostAddon
|
||||
|
||||
|
||||
class AfterEffectsModule(OpenPypeModule, IHostModule):
|
||||
class AfterEffectsModule(OpenPypeModule, IHostAddon):
|
||||
name = "aftereffects"
|
||||
host_name = "aftereffects"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import os
|
||||
from openpype.modules import OpenPypeModule
|
||||
from openpype.modules.interfaces import IHostModule
|
||||
from openpype.modules.interfaces import IHostAddon
|
||||
|
||||
BLENDER_ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
class BlenderModule(OpenPypeModule, IHostModule):
|
||||
class BlenderModule(OpenPypeModule, IHostAddon):
|
||||
name = "blender"
|
||||
host_name = "blender"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import os
|
||||
from openpype.modules import OpenPypeModule
|
||||
from openpype.modules.interfaces import IHostModule
|
||||
from openpype.modules.interfaces import IHostAddon
|
||||
|
||||
HARMONY_HOST_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
class HarmonyAddon(OpenPypeModule, IHostModule):
|
||||
class HarmonyAddon(OpenPypeModule, IHostAddon):
|
||||
name = "harmony"
|
||||
host_name = "harmony"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import os
|
||||
import platform
|
||||
from openpype.modules import OpenPypeModule
|
||||
from openpype.modules.interfaces import IHostModule
|
||||
from openpype.modules.interfaces import IHostAddon
|
||||
|
||||
HIERO_ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
class HieroModule(OpenPypeModule, IHostModule):
|
||||
class HieroModule(OpenPypeModule, IHostAddon):
|
||||
name = "hiero"
|
||||
host_name = "hiero"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import os
|
||||
from openpype.modules import OpenPypeModule
|
||||
from openpype.modules.interfaces import IHostModule
|
||||
from openpype.modules.interfaces import IHostAddon
|
||||
|
||||
MAYA_ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
class OpenPypeMaya(OpenPypeModule, IHostModule):
|
||||
class OpenPypeMaya(OpenPypeModule, IHostAddon):
|
||||
name = "openpype_maya"
|
||||
host_name = "maya"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import os
|
||||
import platform
|
||||
from openpype.modules import OpenPypeModule
|
||||
from openpype.modules.interfaces import IHostModule
|
||||
from openpype.modules.interfaces import IHostAddon
|
||||
|
||||
NUKE_ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
class NukeModule(OpenPypeModule, IHostModule):
|
||||
class NukeModule(OpenPypeModule, IHostAddon):
|
||||
name = "nuke"
|
||||
host_name = "nuke"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import os
|
||||
from openpype.modules import OpenPypeModule
|
||||
from openpype.modules.interfaces import IHostModule
|
||||
from openpype.modules.interfaces import IHostAddon
|
||||
|
||||
PHOTOSHOP_HOST_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
class PhotoshopAddon(OpenPypeModule, IHostModule):
|
||||
class PhotoshopAddon(OpenPypeModule, IHostAddon):
|
||||
name = "photoshop"
|
||||
host_name = "photoshop"
|
||||
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@ import click
|
|||
from openpype.lib import get_openpype_execute_args
|
||||
from openpype.lib.execute import run_detached_process
|
||||
from openpype.modules import OpenPypeModule
|
||||
from openpype.modules.interfaces import ITrayAction, IHostModule
|
||||
from openpype.modules.interfaces import ITrayAction, IHostAddon
|
||||
|
||||
STANDALONEPUBLISH_ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
class StandAlonePublishModule(OpenPypeModule, ITrayAction, IHostModule):
|
||||
class StandAlonePublishModule(OpenPypeModule, ITrayAction, IHostAddon):
|
||||
label = "Publish"
|
||||
name = "standalonepublish_tool"
|
||||
host_name = "standalonepublisher"
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@ import click
|
|||
from openpype.lib import get_openpype_execute_args
|
||||
from openpype.lib.execute import run_detached_process
|
||||
from openpype.modules import OpenPypeModule
|
||||
from openpype.modules.interfaces import ITrayAction, IHostModule
|
||||
from openpype.modules.interfaces import ITrayAction, IHostAddon
|
||||
|
||||
TRAYPUBLISH_ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
class TrayPublishModule(OpenPypeModule, IHostModule, ITrayAction):
|
||||
class TrayPublishModule(OpenPypeModule, IHostAddon, ITrayAction):
|
||||
label = "New Publish (beta)"
|
||||
name = "traypublish_tool"
|
||||
host_name = "traypublish"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import os
|
||||
from openpype.modules import OpenPypeModule
|
||||
from openpype.modules.interfaces import IHostModule
|
||||
from openpype.modules.interfaces import IHostAddon
|
||||
|
||||
TVPAINT_ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
|
@ -13,7 +13,7 @@ def get_launch_script_path():
|
|||
)
|
||||
|
||||
|
||||
class TVPaintModule(OpenPypeModule, IHostModule):
|
||||
class TVPaintModule(OpenPypeModule, IHostAddon):
|
||||
name = "tvpaint"
|
||||
host_name = "tvpaint"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import os
|
||||
from openpype.modules import OpenPypeModule
|
||||
from openpype.modules.interfaces import IHostModule
|
||||
from openpype.modules.interfaces import IHostAddon
|
||||
|
||||
UNREAL_ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
class UnrealModule(OpenPypeModule, IHostModule):
|
||||
class UnrealModule(OpenPypeModule, IHostAddon):
|
||||
name = "unreal"
|
||||
host_name = "unreal"
|
||||
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ import os
|
|||
import click
|
||||
|
||||
from openpype.modules import OpenPypeModule
|
||||
from openpype.modules.interfaces import IHostModule
|
||||
from openpype.modules.interfaces import IHostAddon
|
||||
|
||||
WEBPUBLISHER_ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
class WebpublisherAddon(OpenPypeModule, IHostModule):
|
||||
class WebpublisherAddon(OpenPypeModule, IHostAddon):
|
||||
name = "webpublisher"
|
||||
host_name = "webpublisher"
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ from openpype.lib import (
|
|||
from .interfaces import (
|
||||
OpenPypeInterface,
|
||||
IPluginPaths,
|
||||
IHostModule,
|
||||
IHostAddon,
|
||||
ITrayModule,
|
||||
ITrayService
|
||||
)
|
||||
|
|
@ -811,13 +811,13 @@ class ModulesManager:
|
|||
|
||||
Returns:
|
||||
OpenPypeModule: Found host module by name.
|
||||
None: There was not found module inheriting IHostModule which has
|
||||
None: There was not found module inheriting IHostAddon which has
|
||||
host name set to passed 'host_name'.
|
||||
"""
|
||||
|
||||
for module in self.get_enabled_modules():
|
||||
if (
|
||||
isinstance(module, IHostModule)
|
||||
isinstance(module, IHostAddon)
|
||||
and module.host_name == host_name
|
||||
):
|
||||
return module
|
||||
|
|
@ -828,13 +828,13 @@ class ModulesManager:
|
|||
|
||||
Returns:
|
||||
Iterable[str]: All available host names based on enabled modules
|
||||
inheriting 'IHostModule'.
|
||||
inheriting 'IHostAddon'.
|
||||
"""
|
||||
|
||||
host_names = {
|
||||
module.host_name
|
||||
for module in self.get_enabled_modules()
|
||||
if isinstance(module, IHostModule)
|
||||
if isinstance(module, IHostAddon)
|
||||
}
|
||||
return host_names
|
||||
|
||||
|
|
|
|||
|
|
@ -385,8 +385,8 @@ class ISettingsChangeListener(OpenPypeInterface):
|
|||
pass
|
||||
|
||||
|
||||
class IHostModule(OpenPypeInterface):
|
||||
"""Module which also contain a host implementation."""
|
||||
class IHostAddon(OpenPypeInterface):
|
||||
"""Addon which also contain a host implementation."""
|
||||
|
||||
@abstractproperty
|
||||
def host_name(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue