From 3b3a379b7a722a8438af091cbaf63e9832cd3a09 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Fri, 7 Dec 2018 01:12:34 +0100 Subject: [PATCH] fixing issue with apps not launchign at all after last merge --- pype/ftrack/actions/action_Apps.py | 3 ++- pype/ftrack/actions/ftrack_action_handler.py | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pype/ftrack/actions/action_Apps.py b/pype/ftrack/actions/action_Apps.py index 76c6ba1e06..23667290bd 100644 --- a/pype/ftrack/actions/action_Apps.py +++ b/pype/ftrack/actions/action_Apps.py @@ -9,7 +9,7 @@ from app.api import Logger log = Logger.getLogger(__name__) def registerApp(app, session): - name = app['name'].replace("_", ".") + name = app['name'] variant = "" try: variant = app['name'].split("_")[1] @@ -17,6 +17,7 @@ def registerApp(app, session): log.warning("'{0}' - App 'name' and 'variant' is not separated by '_' (variant is not set)".format(app['name'])) return + log.warning("app name {}".format(name)) abspath = lib.which_app(app['name']) if abspath == None: log.error("'{0}' - App don't have config toml file".format(app['name'])) diff --git a/pype/ftrack/actions/ftrack_action_handler.py b/pype/ftrack/actions/ftrack_action_handler.py index 63561951d4..fb49c40464 100644 --- a/pype/ftrack/actions/ftrack_action_handler.py +++ b/pype/ftrack/actions/ftrack_action_handler.py @@ -135,7 +135,7 @@ class AppAction(object): else: apps = [] for app in project['config']['apps']: - apps.append(app['name'].split("_")[0]) + apps.append(app['name']) if self.identifier not in apps: return False @@ -238,8 +238,8 @@ class AppAction(object): os.environ["AVALON_SILO"] = silo os.environ["AVALON_ASSET"] = entity['parent']['name'] os.environ["AVALON_TASK"] = entity['name'] - os.environ["AVALON_APP"] = self.identifier - os.environ["AVALON_APP_NAME"] = self.identifier + "_" + self.variant + os.environ["AVALON_APP"] = self.identifier.split("_")[0] + os.environ["AVALON_APP_NAME"] = self.identifier os.environ["FTRACK_TASKID"] = id @@ -280,7 +280,7 @@ class AppAction(object): parents.append(session.get(item['type'], item['id'])) # collect all the 'environment' attributes from parents - tools_attr = [os.environ["AVALON_APP_NAME"]] + tools_attr = [os.environ["AVALON_APP"], os.environ["AVALON_APP_NAME"]] for parent in reversed(parents): # check if the attribute is empty, if not use it if parent['custom_attributes']['tools_env']: