From 72a480ab36dd742b4bbf6196f89aed477f03aced Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Mon, 19 Nov 2018 13:15:31 +0100 Subject: [PATCH] Revert "fixing `avalon_tools_env` to `tools_env`" This reverts commit ac6e321685e76141572e67933ae80df6b40c8fb0. --- pype/ftrack/actions/ftrack_action_handler.py | 22 ++++++++------------ 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/pype/ftrack/actions/ftrack_action_handler.py b/pype/ftrack/actions/ftrack_action_handler.py index 87440d0e13..31afc79e7e 100644 --- a/pype/ftrack/actions/ftrack_action_handler.py +++ b/pype/ftrack/actions/ftrack_action_handler.py @@ -62,7 +62,7 @@ class AppAction(object): self.session.event_hub.subscribe( 'topic=ftrack.action.discover and source.user.username={0}'.format( self.session.api_user - ), self._discover + ), self._discover ) self.session.event_hub.subscribe( @@ -196,7 +196,7 @@ class AppAction(object): response = self.launch( self.session, *args - ) + ) return self._handle_result( self.session, response, *args @@ -242,8 +242,7 @@ class AppAction(object): anatomy = t.anatomy io.install() - hierarchy = io.find_one({"type": 'asset', "name": entity['parent']['name']})[ - 'data']['parents'] + hierarchy = io.find_one({"type": 'asset', "name": entity['parent']['name']})['data']['parents'] io.uninstall() if hierarchy: # hierarchy = os.path.sep.join(hierarchy) @@ -261,11 +260,9 @@ class AppAction(object): # TODO Add paths to avalon setup from tomls if self.identifier == 'maya': - os.environ['PYTHONPATH'] += os.pathsep + \ - os.path.join(os.getenv("AVALON_CORE"), 'setup', 'maya') + os.environ['PYTHONPATH'] += os.pathsep + os.path.join(os.getenv("AVALON_CORE"), 'setup', 'maya') elif self.identifier == 'nuke': - os.environ['NUKE_PATH'] = os.pathsep + \ - os.path.join(os.getenv("AVALON_CORE"), 'setup', 'nuke') + os.environ['NUKE_PATH'] = os.pathsep + os.path.join(os.getenv("AVALON_CORE"), 'setup', 'nuke') # config = toml.load(lib.which_app(self.identifier + "_" + self.variant)) env = os.environ @@ -279,8 +276,8 @@ class AppAction(object): tools_attr = [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']: - tools_attr.extend(parent['custom_attributes']['tools_env']) + if parent['custom_attributes']['avalon_tools_env']: + tools_attr.extend(parent['custom_attributes']['avalon_tools_env']) break tools_env = acre.get_tools(tools_attr) @@ -423,7 +420,7 @@ class BaseAction(object): self.session.event_hub.subscribe( 'topic=ftrack.action.discover and source.user.username={0}'.format( self.session.api_user - ), self._discover + ), self._discover ) self.session.event_hub.subscribe( @@ -445,8 +442,7 @@ class BaseAction(object): ) if accepts: - self.logger.info(u'Discovering action with selection: {0}'.format( - args[1]['data'].get('selection', []))) + self.logger.info(u'Discovering action with selection: {0}'.format(args[1]['data'].get('selection', []))) return { 'items': [{ 'label': self.label,