Revert "fixing avalon_tools_env to tools_env"

This reverts commit ac6e321685.
This commit is contained in:
Milan Kolar 2018-11-19 13:15:31 +01:00
parent f4e0546098
commit 72a480ab36

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,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,