mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
fixing avalon_tools_env to tools_env
This commit is contained in:
parent
47e36bb432
commit
ac6e321685
1 changed files with 13 additions and 9 deletions
|
|
@ -65,7 +65,7 @@ class AppAction(object):
|
||||||
self.session.event_hub.subscribe(
|
self.session.event_hub.subscribe(
|
||||||
'topic=ftrack.action.discover and source.user.username={0}'.format(
|
'topic=ftrack.action.discover and source.user.username={0}'.format(
|
||||||
self.session.api_user
|
self.session.api_user
|
||||||
), self._discover
|
), self._discover
|
||||||
)
|
)
|
||||||
|
|
||||||
self.session.event_hub.subscribe(
|
self.session.event_hub.subscribe(
|
||||||
|
|
@ -199,7 +199,7 @@ class AppAction(object):
|
||||||
|
|
||||||
response = self.launch(
|
response = self.launch(
|
||||||
self.session, *args
|
self.session, *args
|
||||||
)
|
)
|
||||||
|
|
||||||
return self._handle_result(
|
return self._handle_result(
|
||||||
self.session, response, *args
|
self.session, response, *args
|
||||||
|
|
@ -245,7 +245,8 @@ class AppAction(object):
|
||||||
|
|
||||||
anatomy = t.anatomy
|
anatomy = t.anatomy
|
||||||
io.install()
|
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()
|
io.uninstall()
|
||||||
if hierarchy:
|
if hierarchy:
|
||||||
# hierarchy = os.path.sep.join(hierarchy)
|
# hierarchy = os.path.sep.join(hierarchy)
|
||||||
|
|
@ -263,9 +264,11 @@ class AppAction(object):
|
||||||
|
|
||||||
# TODO Add paths to avalon setup from tomls
|
# TODO Add paths to avalon setup from tomls
|
||||||
if self.identifier == 'maya':
|
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':
|
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))
|
# config = toml.load(lib.which_app(self.identifier + "_" + self.variant))
|
||||||
|
|
||||||
env = os.environ
|
env = os.environ
|
||||||
|
|
@ -279,8 +282,8 @@ class AppAction(object):
|
||||||
tools_attr = [os.environ["AVALON_APP_NAME"]]
|
tools_attr = [os.environ["AVALON_APP_NAME"]]
|
||||||
for parent in reversed(parents):
|
for parent in reversed(parents):
|
||||||
# check if the attribute is empty, if not use it
|
# check if the attribute is empty, if not use it
|
||||||
if parent['custom_attributes']['avalon_tools_env']:
|
if parent['custom_attributes']['tools_env']:
|
||||||
tools_attr.extend(parent['custom_attributes']['avalon_tools_env'])
|
tools_attr.extend(parent['custom_attributes']['tools_env'])
|
||||||
break
|
break
|
||||||
|
|
||||||
tools_env = acre.get_tools(tools_attr)
|
tools_env = acre.get_tools(tools_attr)
|
||||||
|
|
@ -426,7 +429,7 @@ class BaseAction(object):
|
||||||
self.session.event_hub.subscribe(
|
self.session.event_hub.subscribe(
|
||||||
'topic=ftrack.action.discover and source.user.username={0}'.format(
|
'topic=ftrack.action.discover and source.user.username={0}'.format(
|
||||||
self.session.api_user
|
self.session.api_user
|
||||||
), self._discover
|
), self._discover
|
||||||
)
|
)
|
||||||
|
|
||||||
self.session.event_hub.subscribe(
|
self.session.event_hub.subscribe(
|
||||||
|
|
@ -448,7 +451,8 @@ class BaseAction(object):
|
||||||
)
|
)
|
||||||
|
|
||||||
if accepts:
|
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 {
|
return {
|
||||||
'items': [{
|
'items': [{
|
||||||
'label': self.label,
|
'label': self.label,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue