From 2409dee0c53510ede2df2df8eef8847f256f0ec1 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Wed, 16 Dec 2020 19:04:05 +0100 Subject: [PATCH] ftrack module load default paths to server and user handlers on initialization --- pype/modules/ftrack/ftrack_module.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pype/modules/ftrack/ftrack_module.py b/pype/modules/ftrack/ftrack_module.py index 2560f7bc0c..44607681ec 100644 --- a/pype/modules/ftrack/ftrack_module.py +++ b/pype/modules/ftrack/ftrack_module.py @@ -29,9 +29,15 @@ class FtrackModule( self.enabled = ftrack_settings["enabled"] self.ftrack_url = ftrack_settings["ftrack_server"] - # TODO load from settings - self.server_event_handlers_paths = [] - self.user_event_handlers_paths = [] + current_dir = os.path.dirname(os.path.abspath(__file__)) + self.server_event_handlers_paths = [ + os.path.join(current_dir, "events"), + *ftrack_settings["ftrack_events_path"] + ] + self.user_event_handlers_paths = [ + os.path.join(current_dir, "actions"), + *ftrack_settings["ftrack_actions_path"] + ] # Prepare attribute self.tray_module = None