From 6f5a80bf1b2379e560c06648a106308febda951e Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Tue, 23 Jul 2019 18:10:57 +0200 Subject: [PATCH 1/3] apps actions wont show on project task --- pype/ftrack/lib/ftrack_app_handler.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pype/ftrack/lib/ftrack_app_handler.py b/pype/ftrack/lib/ftrack_app_handler.py index 2d1d88f7d4..29d478b10f 100644 --- a/pype/ftrack/lib/ftrack_app_handler.py +++ b/pype/ftrack/lib/ftrack_app_handler.py @@ -94,6 +94,9 @@ class AppAction(BaseHandler): ): return False + if entities[0]['parent'].entity_type.lower() == 'project': + return False + ft_project = entities[0]['project'] database = pypelib.get_avalon_database() From cef42b84b7ea76463446a37046fd340e6c08e3fa Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Tue, 23 Jul 2019 18:14:51 +0200 Subject: [PATCH 2/3] timer service wont try to launch timers on project tasks --- pype/services/timers_manager/timers_manager.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pype/services/timers_manager/timers_manager.py b/pype/services/timers_manager/timers_manager.py index e1980d3d90..72140de323 100644 --- a/pype/services/timers_manager/timers_manager.py +++ b/pype/services/timers_manager/timers_manager.py @@ -79,6 +79,14 @@ class TimersManager(metaclass=Singleton): } ''' self.last_task = data + + if len(input_data['hierarchy']) < 1: + self.log.error(( + 'Timer has been launched on task which is child of Project.' + ' That is not allowed in Pype!' + )) + return + for module in self.modules: module.start_timer_manager(data) self.is_running = True From e1cc291605562985030bbddb75c00d34777072ac Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Tue, 23 Jul 2019 18:18:20 +0200 Subject: [PATCH 3/3] fixed variable naming --- pype/services/timers_manager/timers_manager.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pype/services/timers_manager/timers_manager.py b/pype/services/timers_manager/timers_manager.py index 72140de323..2259dfc34d 100644 --- a/pype/services/timers_manager/timers_manager.py +++ b/pype/services/timers_manager/timers_manager.py @@ -78,15 +78,15 @@ class TimersManager(metaclass=Singleton): 'task_name': 'Lookdev BG' } ''' - self.last_task = data - - if len(input_data['hierarchy']) < 1: + if len(data['hierarchy']) < 1: self.log.error(( - 'Timer has been launched on task which is child of Project.' - ' That is not allowed in Pype!' + 'Not allowed action in Pype!!' + ' Timer has been launched on task which is child of Project.' )) return + self.last_task = data + for module in self.modules: module.start_timer_manager(data) self.is_running = True