fix 'avalon_tools_env' to 'tools_env'

This commit is contained in:
Jakub Jezek 2018-11-18 21:38:32 +01:00
parent 8b0113b7be
commit 70f42d4db7

View file

@ -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,7 +242,8 @@ 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)
@ -260,9 +261,11 @@ 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
@ -276,8 +279,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']['avalon_tools_env']:
tools_attr.extend(parent['custom_attributes']['avalon_tools_env'])
if parent['custom_attributes']['tools_env']:
tools_attr.extend(parent['custom_attributes']['tools_env'])
break
tools_env = acre.get_tools(tools_attr)
@ -420,7 +423,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(
@ -442,7 +445,8 @@ 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,