diff --git a/pype/lib/applications.py b/pype/lib/applications.py index 70b33d6edf..4970579108 100644 --- a/pype/lib/applications.py +++ b/pype/lib/applications.py @@ -245,11 +245,11 @@ class ApplicationTool: class ApplicationExecutable: def __init__(self, executable): default_launch_args = [] + executable_path = None if isinstance(executable, str): executable_path = executable elif isinstance(executable, list): - executable_path = None for arg in executable: if arg: if executable_path is None: diff --git a/pype/plugins/global/publish/collect_anatomy_context_data.py b/pype/plugins/global/publish/collect_anatomy_context_data.py index e1e6c12ee9..07e58d8cb7 100644 --- a/pype/plugins/global/publish/collect_anatomy_context_data.py +++ b/pype/plugins/global/publish/collect_anatomy_context_data.py @@ -15,6 +15,7 @@ Provides: import os import json +from pype.lib import ApplicationManager from avalon import api, lib import pyblish.api @@ -64,12 +65,12 @@ class CollectAnatomyContextData(pyblish.api.ContextPlugin): "username": context.data["user"] } - avalon_app_name = os.environ.get("AVALON_APP_NAME") - if avalon_app_name: - application_def = lib.get_application(avalon_app_name) - app_dir = application_def.get("application_dir") - if app_dir: - context_data["app"] = app_dir + app_manager = ApplicationManager() + app_name = os.environ.get("AVALON_APP_NAME") + if app_name: + app = app_manager.applications.get(app_name) + if app: + context_data["app"] = app.host_name datetime_data = context.data.get("datetimeData") or {} context_data.update(datetime_data)