Merge branch 'develop' into bugfix/PYPE-104-clean-pythonpath-for-deadline

This commit is contained in:
Milan Kolar 2019-01-02 11:34:06 +01:00
commit 1082d468f0
4 changed files with 13 additions and 16 deletions

View file

@ -34,7 +34,7 @@ def registerApp(app, session):
ftrack_resources = "" # Path to resources here
if 'icon' in apptoml:
icon = apptoml['icon']
icon = apptoml['ftrack_icon']
if '{ftrack_resources}' in icon:
icon = icon.format(ftrack_resources)

View file

@ -242,7 +242,6 @@ class AppAction(object):
'data']['parents']
io.uninstall()
if hierarchy:
# hierarchy = os.path.sep.join(hierarchy)
hierarchy = os.path.join(*hierarchy)
data = {"project": {"name": entity['project']['full_name'],
@ -256,17 +255,6 @@ class AppAction(object):
self.log.error("{0} Error in anatomy.format: {1}".format(__name__, e))
os.environ["AVALON_WORKDIR"] = os.path.join(anatomy.work.root, anatomy.work.folder)
# 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')
elif self.identifier == '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
# collect all parents from the task
parents = []
for item in entity['link']:

View file

@ -199,6 +199,18 @@ class Sync_to_Avalon(BaseEvent):
if 'avalon_' not in cust_attr['key']:
self.custom_attributes.append(cust_attr)
def _launch(self, event):
self.session.reset()
args = self._translate_event(
self.session, event
)
self.launch(
self.session, *args
)
return
def _translate_event(self, session, event):
exceptions = ['assetversion', 'job', 'user', 'reviewsessionobject', 'timer', 'socialfeed', 'timelog']
_selection = event['data'].get('entities',[])

View file

@ -88,9 +88,6 @@ class BaseEvent(object):
)
def _launch(self, event):
self.session.reset()
args = self._translate_event(
self.session, event
)