Ftrack module ingerit ILaunchHookPaths and has implemented get_launch_hook_paths

This commit is contained in:
iLLiCiTiT 2020-12-22 10:48:13 +01:00
parent 3fec8b293a
commit 1ef7dfbd33
2 changed files with 18 additions and 2 deletions

View file

@ -3,9 +3,16 @@ from abc import ABCMeta, abstractmethod
import six
import pype
from pype.modules import (
PypeModule, ITrayModule, IPluginPaths, ITimersManager, IUserModule
PypeModule,
ITrayModule,
IPluginPaths,
ITimersManager,
IUserModule,
ILaunchHookPaths
)
FTRACK_MODULE_DIR = os.path.dirname(os.path.abspath(__file__))
@six.add_metaclass(ABCMeta)
class IFtrackEventHandlerPaths:
@ -19,7 +26,12 @@ class IFtrackEventHandlerPaths:
class FtrackModule(
PypeModule, ITrayModule, IPluginPaths, ITimersManager, IUserModule
PypeModule,
ITrayModule,
IPluginPaths,
ITimersManager,
IUserModule,
ILaunchHookPaths
):
name = "ftrack"
@ -54,6 +66,10 @@ class FtrackModule(
"publish": [os.path.join(pype.PLUGINS_DIR, "ftrack", "publish")]
}
def get_launch_hook_paths(self):
"""Implementation of `ILaunchHookPaths`."""
return os.path.join(FTRACK_MODULE_DIR, "launch_hooks")
def connect_with_modules(self, enabled_modules):
for module in enabled_modules:
if not isinstance(module, IFtrackEventHandlerPaths):