interfaces inherit from OpenPypeInterface

This commit is contained in:
iLLiCiTiT 2021-07-27 19:01:08 +02:00
parent f2b53133e0
commit abdaf019ba
6 changed files with 36 additions and 19 deletions

View file

@ -2,13 +2,15 @@
from .base import (
PypeModule,
OpenPypeInterface,
ModulesManager,
TrayModulesManager
)
from .interfaces import (
ITrayModule,
ITrayAction,
ITrayService,
IPluginPaths,
ILaunchHookPaths,
ModulesManager,
TrayModulesManager
ILaunchHookPaths
)
from .settings_action import (
SettingsAction,
@ -47,13 +49,14 @@ __all__ = (
"PypeModule",
"OpenPypeInterface",
"ModulesManager",
"TrayModulesManager",
"ITrayModule",
"ITrayAction",
"ITrayService",
"IPluginPaths",
"ILaunchHookPaths",
"ModulesManager",
"TrayModulesManager",
"SettingsAction",
"LocalSettingsAction",

View file

@ -6,6 +6,7 @@ import six
import openpype
from openpype.modules import (
PypeModule,
OpenPypeInterface,
ITrayModule,
IPluginPaths,
ITimersManager,
@ -17,8 +18,7 @@ from openpype.settings import SaveWarningExc
FTRACK_MODULE_DIR = os.path.dirname(os.path.abspath(__file__))
@six.add_metaclass(ABCMeta)
class IFtrackEventHandlerPaths:
class IFtrackEventHandlerPaths(OpenPypeInterface):
"""Other modules interface to return paths to ftrack event handlers.
Expected output is dictionary with "server" and "user" keys.

View file

@ -4,11 +4,14 @@ from abc import ABCMeta, abstractmethod
import six
from openpype.modules import PypeModule, ITrayService
from openpype.modules import (
PypeModule,
OpenPypeInterface,
ITrayService
)
@six.add_metaclass(ABCMeta)
class IIdleManager:
class IIdleManager(OpenPypeInterface):
"""Other modules interface to return callbacks by idle time in seconds.
Expected output is dictionary with seconds <int> as keys and callback/s

View file

@ -2,11 +2,14 @@ from abc import ABCMeta, abstractmethod
import six
from . import PypeModule, ITrayAction
from . import (
PypeModule,
OpenPypeInterface,
ITrayAction
)
@six.add_metaclass(ABCMeta)
class ISettingsChangeListener:
class ISettingsChangeListener(OpenPypeInterface):
"""Module has plugin paths to return.
Expected result is dictionary with keys "publish", "create", "load" or

View file

@ -2,12 +2,17 @@ import os
import collections
from abc import ABCMeta, abstractmethod
import six
from .. import PypeModule, ITrayService, IIdleManager, IWebServerRoutes
from .. import (
PypeModule,
OpenPypeInterface,
ITrayService,
IIdleManager,
IWebServerRoutes
)
from avalon.api import AvalonMongoDB
@six.add_metaclass(ABCMeta)
class ITimersManager:
class ITimersManager(OpenPypeInterface):
timer_manager_module = None
@abstractmethod

View file

@ -5,11 +5,14 @@ from abc import ABCMeta, abstractmethod
import six
from openpype import resources
from .. import PypeModule, ITrayService
from .. import (
PypeModule,
OpenPypeInterface,
ITrayService
)
@six.add_metaclass(ABCMeta)
class IWebServerRoutes:
class IWebServerRoutes(OpenPypeInterface):
"""Other modules interface to register their routes."""
@abstractmethod
def webserver_initialization(self, server_manager):