diff --git a/pype/hooks/pre_global_host_data.py b/pype/hooks/pre_global_host_data.py index 74be208367..5405bc0894 100644 --- a/pype/hooks/pre_global_host_data.py +++ b/pype/hooks/pre_global_host_data.py @@ -32,7 +32,7 @@ class GlobalHostDataHook(PreLaunchHook): "project_name": self.data["project_name"], "asset_name": self.data["asset_name"], "task_name": self.data["task_name"], - "app_name": app.app_name, + "app": app, "dbcon": self.data["dbcon"], @@ -41,7 +41,6 @@ class GlobalHostDataHook(PreLaunchHook): "anatomy": self.data["anatomy"], - "settings_env": self.data.get("settings_env"), "env": self.launch_context.env, "log": self.log diff --git a/pype/lib/applications.py b/pype/lib/applications.py index 4b2cab99aa..6df296db95 100644 --- a/pype/lib/applications.py +++ b/pype/lib/applications.py @@ -4,6 +4,7 @@ import copy import json import platform import getpass +import collections import inspect import subprocess import distutils.spawn @@ -90,63 +91,199 @@ class ApplicationLaunchFailed(Exception): pass +class ApplicationGroup: + """Hold information about application group. + + Application group wraps different versions(variants) of application. + e.g. "maya" is group and "maya_2020" is variant. + + Group hold `host_name` which is implementation name used in pype. Also + holds `enabled` if whole app group is enabled or `icon` for application + icon path in resources. + + Group has also `environment` which hold same environments for all variants. + + Args: + name (str): Groups' name. + data (dict): Group defying data loaded from settings. + manager (ApplicationManager): Manager that created the group. + """ + def __init__(self, name, data, manager): + self.name = name + self.manager = manager + self._data = data + + self.enabled = data.get("enabled", True) + self.label = data.get("label") or None + self.icon = data.get("icon") or None + self._environment = data.get("environment") or {} + + host_name = data.get("host_name", None) + self.is_host = host_name is not None + self.host_name = host_name + + variants = data.get("variants") or {} + for variant_name, variant_data in variants.items(): + variants[variant_name] = Application( + variant_name, variant_data, self + ) + + self.variants = variants + + def __repr__(self): + return "<{}> - {}".format(self.__class__.__name__, self.name) + + def __iter__(self): + for variant in self.variants.values(): + yield variant + + @property + def environment(self): + return copy.deepcopy(self._environment) + + +class Application: + """Hold information about application. + + Object by itself does nothing special. + + Args: + name (str): Specific version (or variant) of application. + e.g. "maya2020", "nuke11.3", etc. + data (dict): Data for the version containing information about + executables, variant label or if is enabled. + Only required key is `executables`. + group (ApplicationGroup): App group object that created the applicaiton + and under which application belongs. + """ + + def __init__(self, name, data, group): + self.name = name + self.group = group + self._data = data + + enabled = False + if group.enabled: + enabled = data.get("enabled", True) + self.enabled = enabled + + self.label = data.get("variant_label") or name + self.full_name = "/".join((group.name, name)) + + if group.label: + full_label = " ".join((group.label, self.label)) + else: + full_label = self.label + self.full_label = full_label + self._environment = data.get("environment") or {} + + _executables = data["executables"] + if not _executables: + _executables = [] + + elif isinstance(_executables, dict): + _executables = _executables.get(platform.system().lower()) or [] + + _arguments = data["arguments"] + if not _arguments: + _arguments = [] + + elif isinstance(_arguments, dict): + _arguments = _arguments.get(platform.system().lower()) or [] + + executables = [] + for executable in _executables: + executables.append(ApplicationExecutable(executable)) + + self.executables = executables + self.arguments = _arguments + + def __repr__(self): + return "<{}> - {}".format(self.__class__.__name__, self.full_name) + + @property + def environment(self): + return copy.deepcopy(self._environment) + + @property + def manager(self): + return self.group.manager + + @property + def host_name(self): + return self.group.host_name + + @property + def icon(self): + return self.group.icon + + @property + def is_host(self): + return self.group.is_host + + def find_executable(self): + """Try to find existing executable for application. + + Returns (str): Path to executable from `executables` or None if any + exists. + """ + for executable in self.executables: + if executable.exists(): + return executable + return None + + def launch(self, *args, **kwargs): + """Launch the application. + + For this purpose is used manager's launch method to keep logic at one + place. + + Arguments must match with manager's launch method. That's why *args + **kwargs are used. + + Returns: + subprocess.Popen: Return executed process as Popen object. + """ + return self.manager.launch(self.name, *args, **kwargs) + + class ApplicationManager: def __init__(self): self.log = PypeLogger().get_logger(self.__class__.__name__) + self.app_groups = {} self.applications = {} + self.tool_groups = {} self.tools = {} self.refresh() def refresh(self): """Refresh applications from settings.""" + self.app_groups.clear() self.applications.clear() + self.tool_groups.clear() self.tools.clear() settings = get_system_settings() - hosts_definitions = settings["applications"] - for app_group, variant_definitions in hosts_definitions.items(): - enabled = variant_definitions["enabled"] - label = variant_definitions.get("label") or app_group - variants = variant_definitions.get("variants") or {} - icon = variant_definitions.get("icon") - group_host_name = variant_definitions.get("host_name") or None - for app_name, app_data in variants.items(): - if app_name in self.applications: - raise AssertionError(( - "BUG: Duplicated application name in settings \"{}\"" - ).format(app_name)) - - # If host is disabled then disable all variants - if not enabled: - app_data["enabled"] = enabled - - # Pass label from host definition - if not app_data.get("label"): - app_data["label"] = label - - if not app_data.get("icon"): - app_data["icon"] = icon - - host_name = app_data.get("host_name") or group_host_name - - app_data["is_host"] = host_name is not None - - self.applications[app_name] = Application( - app_group, app_name, host_name, app_data, self - ) + app_defs = settings["applications"] + for group_name, variant_defs in app_defs.items(): + group = ApplicationGroup(group_name, variant_defs, self) + self.app_groups[group_name] = group + for app in group: + # TODO This should be replaced with `full_name` in future + self.applications[app.name] = app tools_definitions = settings["tools"]["tool_groups"] for tool_group_name, tool_group_data in tools_definitions.items(): - tool_variants = tool_group_data.get("variants") or {} - for tool_name, tool_data in tool_variants.items(): - tool = ApplicationTool(tool_name, tool_group_name) - if tool.full_name in self.tools: - self.log.warning(( - "Duplicated tool name in settings \"{}\"" - ).format(tool.full_name)) + if not tool_group_name: + continue + group = EnvironmentToolGroup( + tool_group_name, tool_group_data, self + ) + self.tool_groups[tool_group_name] = group + for tool in group: self.tools[tool.full_name] = tool def launch(self, app_name, **data): @@ -184,23 +321,69 @@ class ApplicationManager: return context.launch() -class ApplicationTool: +class EnvironmentToolGroup: + """Hold information about environment tool group. + + Environment tool group may hold different variants of same tool and set + environments that are same for all of them. + + e.g. "mtoa" may have different versions but all environments except one + are same. + + Args: + name (str): Name of the tool group. + data (dict): Group's information with it's variants. + manager (ApplicationManager): Manager that creates the group. + """ + + def __init__(self, name, data, manager): + self.name = name + self._data = data + self.manager = manager + self._environment = data["environment"] + + variants = data.get("variants") or {} + variants_by_name = {} + for variant_name, variant_env in variants.items(): + tool = EnvironmentTool(variant_name, variant_env, self) + variants_by_name[variant_name] = tool + self.variants = variants_by_name + + def __repr__(self): + return "<{}> - {}".format(self.__class__.__name__, self.name) + + def __iter__(self): + for variant in self.variants.values(): + yield variant + + @property + def environment(self): + return copy.deepcopy(self._environment) + + +class EnvironmentTool: """Hold information about application tool. Structure of tool information. Args: - tool_name (str): Name of the tool. - group_name (str): Name of group which wraps tool. + name (str): Name of the tool. + environment (dict): Variant environments. + group (str): Name of group which wraps tool. """ - def __init__(self, tool_name, group_name): - self.name = tool_name - self.group_name = group_name + def __init__(self, name, environment, group): + self.name = name + self.group = group + self._environment = environment + self.full_name = "/".join((group.name, name)) + + def __repr__(self): + return "<{}> - {}".format(self.__class__.__name__, self.full_name) @property - def full_name(self): - return "/".join((self.group_name, self.name)) + def environment(self): + return copy.deepcopy(self._environment) class ApplicationExecutable: @@ -235,94 +418,6 @@ class ApplicationExecutable: return bool(self._realpath()) -class Application: - """Hold information about application. - - Object by itself does nothing special. - - Args: - app_group (str): App group name. - e.g. "maya", "nuke", "photoshop", etc. - app_name (str): Specific version (or variant) of host. - e.g. "maya2020", "nuke11.3", etc. - host_name (str): Name of host implementation. - app_data (dict): Data for the version containing information about - executables, label, variant label, icon or if is enabled. - Only required key is `executables`. - manager (ApplicationManager): Application manager that created object. - """ - - def __init__(self, app_group, app_name, host_name, app_data, manager): - self.app_group = app_group - self.app_name = app_name - self.host_name = host_name - self.app_data = app_data - self.manager = manager - - self.label = app_data.get("label") or app_name - self.variant_label = app_data.get("variant_label") or None - self.icon = app_data.get("icon") or None - self.enabled = app_data.get("enabled", True) - self.is_host = app_data.get("is_host", False) - - _executables = app_data["executables"] - if not _executables: - _executables = [] - - elif isinstance(_executables, dict): - _executables = _executables.get(platform.system().lower()) or [] - - _arguments = app_data["arguments"] - if not _arguments: - _arguments = [] - - elif isinstance(_arguments, dict): - _arguments = _arguments.get(platform.system().lower()) or [] - - executables = [] - for executable in _executables: - executables.append(ApplicationExecutable(executable)) - - self.executables = executables - self.arguments = _arguments - - @property - def full_label(self): - """Full label of application. - - Concatenate `label` and `variant_label` attributes if `variant_label` - is set. - """ - if self.variant_label: - return "{} {}".format(self.label, self.variant_label) - return str(self.label) - - def find_executable(self): - """Try to find existing executable for application. - - Returns (str): Path to executable from `executables` or None if any - exists. - """ - for executable in self.executables: - if executable.exists(): - return executable - return None - - def launch(self, *args, **kwargs): - """Launch the application. - - For this purpose is used manager's launch method to keep logic at one - place. - - Arguments must match with manager's launch method. That's why *args - **kwargs are used. - - Returns: - subprocess.Popen: Return executed process as Popen object. - """ - return self.manager.launch(self.app_name, *args, **kwargs) - - @six.add_metaclass(ABCMeta) class LaunchHook: """Abstract base class of launch hook.""" @@ -376,7 +471,7 @@ class LaunchHook: return False if cls.app_groups: - if launch_context.app_group not in cls.app_groups: + if launch_context.app_group.name not in cls.app_groups: return False if cls.app_names: @@ -403,11 +498,11 @@ class LaunchHook: @property def app_group(self): - return getattr(self.application, "app_group", None) + return getattr(self.application, "group", None) @property def app_name(self): - return getattr(self.application, "app_name", None) + return getattr(self.application, "name", None) def validate(self): """Optional validation of launch hook on initialization. @@ -482,12 +577,6 @@ class ApplicationLaunchContext: self.data = dict(data) - # Load settings if were not passed in data - settings_env = self.data.get("settings_env") - if settings_env is None: - settings_env = get_environments() - self.data["settings_env"] = settings_env - # subprocess.Popen launch arguments (first argument in constructor) self.launch_args = executable.as_args() self.launch_args.extend(application.arguments) @@ -676,7 +765,7 @@ class ApplicationLaunchContext: @property def app_name(self): - return self.application.app_name + return self.application.name @property def host_name(self): @@ -684,7 +773,7 @@ class ApplicationLaunchContext: @property def app_group(self): - return self.application.app_group + return self.application.group @property def manager(self): @@ -806,9 +895,6 @@ class EnvironmentPrepData(dict): if data.get("env") is None: data["env"] = os.environ.copy() - if data.get("settings_env") is None: - data["settings_env"] = get_environments() - super(EnvironmentPrepData, self).__init__(data) @@ -898,29 +984,42 @@ def prepare_host_environments(data): app = data["app"] log = data["log"] - # Keys for getting environments - env_keys = [app.app_group, app.app_name] + # `added_env_keys` has debug purpose + added_env_keys = {app.group.name, app.name} + # Environments for application + environments = [ + app.group.environment, + app.environment + ] asset_doc = data.get("asset_doc") + # Add tools environments + groups_by_name = {} + tool_by_group_name = collections.defaultdict(list) if asset_doc: - # Add tools environments + # Make sure each tool group can be added only once for key in asset_doc["data"].get("tools_env") or []: tool = app.manager.tools.get(key) - if tool: - if tool.group_name not in env_keys: - env_keys.append(tool.group_name) + if not tool: + continue + groups_by_name[tool.group.name] = tool.group + tool_by_group_name[tool.group.name].append(tool) - if tool.name not in env_keys: - env_keys.append(tool.name) + for group_name, group in groups_by_name.items(): + environments.append(group.environment) + added_env_keys.add(group_name) + for tool in tool_by_group_name[group_name]: + environments.append(tool.environment) + added_env_keys.add(tool.name) log.debug( - "Finding environment groups for keys: {}".format(env_keys) + "Will add environments for apps and tools: {}".format( + ", ".join(added_env_keys) + ) ) - settings_env = data["settings_env"] env_values = {} - for env_key in env_keys: - _env_values = settings_env.get(env_key) + for _env_values in environments: if not _env_values: continue @@ -1018,7 +1117,8 @@ def prepare_context_environments(data): "AVALON_ASSET": asset_doc["name"], "AVALON_TASK": task_name, "AVALON_APP": app.host_name, - "AVALON_APP_NAME": app.app_name, + # TODO this hould be `app.full_name` in future PRs + "AVALON_APP_NAME": app.name, "AVALON_WORKDIR": workdir } log.debug( diff --git a/pype/modules/ftrack/event_handlers_user/action_applications.py b/pype/modules/ftrack/event_handlers_user/action_applications.py index 5b6657793a..2c42cadfb7 100644 --- a/pype/modules/ftrack/event_handlers_user/action_applications.py +++ b/pype/modules/ftrack/event_handlers_user/action_applications.py @@ -133,8 +133,8 @@ class AppplicationsAction(BaseAction): app_icon = None items.append({ - "label": app.label, - "variant": app.variant_label, + "label": app.group.label, + "variant": app.label, "description": None, "actionIdentifier": self.identifier + app_name, "icon": app_icon diff --git a/pype/settings/defaults/system_settings/applications.json b/pype/settings/defaults/system_settings/applications.json index ea910e125d..5eccdfb83d 100644 --- a/pype/settings/defaults/system_settings/applications.json +++ b/pype/settings/defaults/system_settings/applications.json @@ -16,25 +16,12 @@ "MAYA_DISABLE_CER": "Yes", "PYMEL_SKIP_MEL_INIT": "Yes", "LC_ALL": "C", - "PYPE_LOG_NO_COLORS": "Yes", - "__environment_keys__": { - "maya": [ - "PYTHONPATH", - "MAYA_DISABLE_CLIC_IPM", - "MAYA_DISABLE_CIP", - "MAYA_DISABLE_CER", - "PYMEL_SKIP_MEL_INIT", - "LC_ALL", - "PYPE_LOG_NO_COLORS" - ] - } + "PYPE_LOG_NO_COLORS": "Yes" }, "variants": { "maya_2020": { "enabled": true, - "label": "", "variant_label": "2020", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Autodesk\\Maya2020\\bin\\maya.exe" @@ -50,19 +37,12 @@ "linux": [] }, "environment": { - "MAYA_VERSION": "2020", - "__environment_keys__": { - "maya_2020": [ - "MAYA_VERSION" - ] - } + "MAYA_VERSION": "2020" } }, "maya_2019": { "enabled": true, - "label": "", "variant_label": "2019", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Autodesk\\Maya2019\\bin\\maya.exe" @@ -78,19 +58,12 @@ "linux": [] }, "environment": { - "MAYA_VERSION": "2019", - "__environment_keys__": { - "maya_2019": [ - "MAYA_VERSION" - ] - } + "MAYA_VERSION": "2019" } }, "maya_2018": { "enabled": true, - "label": "", "variant_label": "2018", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Autodesk\\Maya2018\\bin\\maya.exe" @@ -106,12 +79,7 @@ "linux": [] }, "environment": { - "MAYA_VERSION": "2018", - "__environment_keys__": { - "maya_2018": [ - "MAYA_VERSION" - ] - } + "MAYA_VERSION": "2018" } } } @@ -134,26 +102,12 @@ "PYMEL_SKIP_MEL_INIT": "Yes", "LC_ALL": "C", "PYPE_LOG_NO_COLORS": "Yes", - "MAYA_TEST": "{MAYA_VERSION}", - "__environment_keys__": { - "mayabatch": [ - "PYTHONPATH", - "MAYA_DISABLE_CLIC_IPM", - "MAYA_DISABLE_CIP", - "MAYA_DISABLE_CER", - "PYMEL_SKIP_MEL_INIT", - "LC_ALL", - "PYPE_LOG_NO_COLORS", - "MAYA_TEST" - ] - } + "MAYA_TEST": "{MAYA_VERSION}" }, "variants": { "mayabatch_2020": { "enabled": true, - "label": "", "variant_label": "2020", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Autodesk\\Maya2020\\bin\\mayabatch.exe" @@ -167,19 +121,12 @@ "linux": [] }, "environment": { - "MAYA_VERSION": "2020", - "__environment_keys__": { - "mayabatch_2020": [ - "MAYA_VERSION" - ] - } + "MAYA_VERSION": "2020" } }, "mayabatch_2019": { "enabled": true, - "label": "", "variant_label": "2019", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Autodesk\\Maya2019\\bin\\mayabatch.exe" @@ -193,19 +140,12 @@ "linux": [] }, "environment": { - "MAYA_VERSION": "2019", - "__environment_keys__": { - "mayabatch_2019": [ - "MAYA_VERSION" - ] - } + "MAYA_VERSION": "2019" } }, "mayabatch_2018": { "enabled": true, - "label": "", "variant_label": "2018", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Autodesk\\Maya2018\\bin\\mayabatch.exe" @@ -219,12 +159,7 @@ "linux": [] }, "environment": { - "MAYA_VERSION": "2018", - "__environment_keys__": { - "mayabatch_2018": [ - "MAYA_VERSION" - ] - } + "MAYA_VERSION": "2018" } } } @@ -243,21 +178,12 @@ "PATH": { "windows": "C:/Program Files (x86)/QuickTime/QTSystem/;{PATH}" }, - "LOGLEVEL": "DEBUG", - "__environment_keys__": { - "nuke": [ - "NUKE_PATH", - "PATH", - "LOGLEVEL" - ] - } + "LOGLEVEL": "DEBUG" }, "variants": { "nuke_12-2": { "enabled": true, - "label": "", "variant_label": "12.2", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Nuke12.2v3\\Nuke12.2.exe" @@ -272,17 +198,11 @@ "darwin": [], "linux": [] }, - "environment": { - "__environment_keys__": { - "nuke_12-2": [] - } - } + "environment": {} }, "nuke_12-0": { "enabled": true, - "label": "", "variant_label": "12.0", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Nuke12.0v1\\Nuke12.0.exe" @@ -297,17 +217,11 @@ "darwin": [], "linux": [] }, - "environment": { - "__environment_keys__": { - "nuke_12-0": [] - } - } + "environment": {} }, "nuke_11-3": { "enabled": true, - "label": "", "variant_label": "11.3", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Nuke11.3v1\\Nuke11.3.exe" @@ -322,17 +236,11 @@ "darwin": [], "linux": [] }, - "environment": { - "__environment_keys__": { - "nuke_11-3": [] - } - } + "environment": {} }, "nuke_11-2": { "enabled": true, - "label": "", "variant_label": "11.2", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Nuke11.2v2\\Nuke11.2.exe" @@ -345,11 +253,7 @@ "darwin": [], "linux": [] }, - "environment": { - "__environment_keys__": { - "nuke_11-2": [] - } - } + "environment": {} } } }, @@ -367,21 +271,12 @@ "PATH": { "windows": "C:/Program Files (x86)/QuickTime/QTSystem/;{PATH}" }, - "LOGLEVEL": "DEBUG", - "__environment_keys__": { - "nukex": [ - "NUKE_PATH", - "PATH", - "LOGLEVEL" - ] - } + "LOGLEVEL": "DEBUG" }, "variants": { "nukex_12-2": { "enabled": true, - "label": "", "variant_label": "12.2", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Nuke12.2v3\\Nuke12.2.exe" @@ -402,17 +297,11 @@ "--nukex" ] }, - "environment": { - "__environment_keys__": { - "nukex_12-2": [] - } - } + "environment": {} }, "nukex_12-0": { "enabled": true, - "label": "", "variant_label": "12.0", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Nuke12.0v1\\Nuke12.0.exe" @@ -433,17 +322,11 @@ "--nukex" ] }, - "environment": { - "__environment_keys__": { - "nukex_12-0": [] - } - } + "environment": {} }, "nukex_11-3": { "enabled": true, - "label": "", "variant_label": "11.3", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Nuke11.3v1\\Nuke11.3.exe" @@ -464,17 +347,11 @@ "--nukex" ] }, - "environment": { - "__environment_keys__": { - "nukex_11-3": [] - } - } + "environment": {} }, "nukex_11-2": { "enabled": true, - "label": "", "variant_label": "11.2", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Nuke11.2v2\\Nuke11.2.exe" @@ -493,11 +370,7 @@ "--nukex" ] }, - "environment": { - "__environment_keys__": { - "nukex_11-2": [] - } - } + "environment": {} } } }, @@ -515,23 +388,12 @@ }, "WORKFILES_STARTUP": "0", "TAG_ASSETBUILD_STARTUP": "0", - "LOGLEVEL": "DEBUG", - "__environment_keys__": { - "nukestudio": [ - "HIERO_PLUGIN_PATH", - "PATH", - "WORKFILES_STARTUP", - "TAG_ASSETBUILD_STARTUP", - "LOGLEVEL" - ] - } + "LOGLEVEL": "DEBUG" }, "variants": { "nukestudio_12-2": { "enabled": true, - "label": "", "variant_label": "12.2", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Nuke12.2v3\\Nuke12.2.exe" @@ -552,17 +414,11 @@ "--studio" ] }, - "environment": { - "__environment_keys__": { - "nukestudio_12-2": [] - } - } + "environment": {} }, "nukestudio_12-0": { "enabled": true, - "label": "", "variant_label": "12.0", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Nuke12.0v1\\Nuke12.0.exe" @@ -583,17 +439,11 @@ "--studio" ] }, - "environment": { - "__environment_keys__": { - "nukestudio_12-0": [] - } - } + "environment": {} }, "nukestudio_11-3": { "enabled": true, - "label": "", "variant_label": "11.3", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Nuke11.3v1\\Nuke11.3.exe" @@ -614,17 +464,11 @@ "--studio" ] }, - "environment": { - "__environment_keys__": { - "nukestudio_11-3": [] - } - } + "environment": {} }, "nukestudio_11-2": { "enabled": true, - "label": "", "variant_label": "11.2", - "icon": "", "executables": { "windows": [], "darwin": [], @@ -641,11 +485,7 @@ "--studio" ] }, - "environment": { - "__environment_keys__": { - "nukestudio_11-2": [] - } - } + "environment": {} } } }, @@ -663,23 +503,12 @@ }, "WORKFILES_STARTUP": "0", "TAG_ASSETBUILD_STARTUP": "0", - "LOGLEVEL": "DEBUG", - "__environment_keys__": { - "hiero": [ - "HIERO_PLUGIN_PATH", - "PATH", - "WORKFILES_STARTUP", - "TAG_ASSETBUILD_STARTUP", - "LOGLEVEL" - ] - } + "LOGLEVEL": "DEBUG" }, "variants": { "hiero_12-2": { "enabled": true, - "label": "", "variant_label": "12.2", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Nuke12.2v3\\Nuke12.2.exe" @@ -700,17 +529,11 @@ "--hiero" ] }, - "environment": { - "__environment_keys__": { - "hiero_12-2": [] - } - } + "environment": {} }, "hiero_12-0": { "enabled": true, - "label": "", "variant_label": "12.0", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Nuke12.0v1\\Nuke12.0.exe" @@ -731,17 +554,11 @@ "--hiero" ] }, - "environment": { - "__environment_keys__": { - "hiero_12-0": [] - } - } + "environment": {} }, "hiero_11-3": { "enabled": true, - "label": "", "variant_label": "11.3", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Nuke11.3v1\\Nuke11.3.exe" @@ -762,17 +579,11 @@ "--hiero" ] }, - "environment": { - "__environment_keys__": { - "hiero_11-3": [] - } - } + "environment": {} }, "hiero_11-2": { "enabled": true, - "label": "", "variant_label": "11.2", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Nuke11.2v2\\Nuke11.2.exe" @@ -791,11 +602,7 @@ "--hiero" ] }, - "environment": { - "__environment_keys__": { - "hiero_11-2": [] - } - } + "environment": {} } } }, @@ -826,24 +633,12 @@ "{PYTHON36}/Scripts", "{PATH}" ], - "PYPE_LOG_NO_COLORS": "Yes", - "__environment_keys__": { - "fusion": [ - "FUSION_UTILITY_SCRIPTS_SOURCE_DIR", - "FUSION_UTILITY_SCRIPTS_DIR", - "PYTHON36", - "PYTHONPATH", - "PATH", - "PYPE_LOG_NO_COLORS" - ] - } + "PYPE_LOG_NO_COLORS": "Yes" }, "variants": { "fusion_16": { "enabled": true, - "label": "", "variant_label": "16", - "icon": "", "executables": { "windows": [], "darwin": [], @@ -854,17 +649,11 @@ "darwin": [], "linux": [] }, - "environment": { - "__environment_keys__": { - "fusion_16": [] - } - } + "environment": {} }, "fusion_9": { "enabled": true, - "label": "", "variant_label": "9", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Blackmagic Design\\Fusion 9\\Fusion.exe" @@ -877,11 +666,7 @@ "darwin": [], "linux": [] }, - "environment": { - "__environment_keys__": { - "fusion_9": [] - } - } + "environment": {} } } }, @@ -926,28 +711,12 @@ ], "PRE_PYTHON_SCRIPT": "{PYPE_ROOT}/pype/resolve/preload_console.py", "PYPE_LOG_NO_COLORS": "True", - "RESOLVE_DEV": "True", - "__environment_keys__": { - "resolve": [ - "RESOLVE_UTILITY_SCRIPTS_SOURCE_DIR", - "RESOLVE_SCRIPT_API", - "RESOLVE_SCRIPT_LIB", - "RESOLVE_UTILITY_SCRIPTS_DIR", - "PYTHON36_RESOLVE", - "PYTHONPATH", - "PATH", - "PRE_PYTHON_SCRIPT", - "PYPE_LOG_NO_COLORS", - "RESOLVE_DEV" - ] - } + "RESOLVE_DEV": "True" }, "variants": { "resolve_16": { "enabled": true, - "label": "", "variant_label": "16", - "icon": "", "executables": { "windows": [ "C:/Program Files/Blackmagic Design/DaVinci Resolve/Resolve.exe" @@ -960,11 +729,7 @@ "darwin": [], "linux": [] }, - "environment": { - "__environment_keys__": { - "resolve_16": [] - } - } + "environment": {} } } }, @@ -983,20 +748,12 @@ "darwin": "{PYPE_ROOT}/pype/hosts/houdini/startup:&", "linux": "{PYPE_ROOT}/pype/hosts/houdini/startup:&", "windows": "{PYPE_ROOT}/pype/hosts/houdini/startup;&" - }, - "__environment_keys__": { - "houdini": [ - "HOUDINI_PATH", - "HOUDINI_MENU_PATH" - ] } }, "variants": { "houdini_18-5": { "enabled": true, - "label": "", "variant_label": "18.5", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Side Effects Software\\Houdini 18.5.499\\bin\\houdini.exe" @@ -1009,17 +766,11 @@ "darwin": [], "linux": [] }, - "environment": { - "__environment_keys__": { - "houdini_18-5": [] - } - } + "environment": {} }, "houdini_18": { "enabled": true, - "label": "", "variant_label": "18", - "icon": "", "executables": { "windows": [], "darwin": [], @@ -1030,17 +781,11 @@ "darwin": [], "linux": [] }, - "environment": { - "__environment_keys__": { - "houdini_18": [] - } - } + "environment": {} }, "houdini_17": { "enabled": true, - "label": "", "variant_label": "17", - "icon": "", "executables": { "windows": [], "darwin": [], @@ -1051,11 +796,7 @@ "darwin": [], "linux": [] }, - "environment": { - "__environment_keys__": { - "houdini_17": [] - } - } + "environment": {} } } }, @@ -1070,21 +811,12 @@ "{PYPE_REPOS_ROOT}/avalon-core/setup/blender", "{PYTHONPATH}" ], - "CREATE_NEW_CONSOLE": "yes", - "__environment_keys__": { - "blender": [ - "BLENDER_USER_SCRIPTS", - "PYTHONPATH", - "CREATE_NEW_CONSOLE" - ] - } + "CREATE_NEW_CONSOLE": "yes" }, "variants": { "blender_2-83": { "enabled": true, - "label": "", "variant_label": "2.83", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Blender Foundation\\Blender 2.83\\blender.exe" @@ -1103,17 +835,11 @@ "--python-use-system-env" ] }, - "environment": { - "__environment_keys__": { - "blender_2-83": [] - } - } + "environment": {} }, "blender_2-90": { "enabled": true, - "label": "", "variant_label": "2.90", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Blender Foundation\\Blender 2.90\\blender.exe" @@ -1132,11 +858,7 @@ "--python-use-system-env" ] }, - "environment": { - "__environment_keys__": { - "blender_2-90": [] - } - } + "environment": {} } } }, @@ -1147,20 +869,12 @@ "host_name": "harmony", "environment": { "AVALON_HARMONY_WORKFILES_ON_LAUNCH": "1", - "LIB_OPENHARMONY_PATH": "{PYPE_ROOT}/pype/vendor/OpenHarmony", - "__environment_keys__": { - "harmony": [ - "AVALON_HARMONY_WORKFILES_ON_LAUNCH", - "LIB_OPENHARMONY_PATH" - ] - } + "LIB_OPENHARMONY_PATH": "{PYPE_ROOT}/pype/vendor/OpenHarmony" }, "variants": { "harmony_20": { "enabled": true, - "label": "", "variant_label": "20", - "icon": "", "executables": { "windows": [], "darwin": [], @@ -1171,17 +885,11 @@ "darwin": [], "linux": [] }, - "environment": { - "__environment_keys__": { - "harmony_20": [] - } - } + "environment": {} }, "harmony_17": { "enabled": true, - "label": "", "variant_label": "17", - "icon": "", "executables": { "windows": [], "darwin": [ @@ -1194,11 +902,7 @@ "darwin": [], "linux": [] }, - "environment": { - "__environment_keys__": { - "harmony_17": [] - } - } + "environment": {} } } }, @@ -1208,19 +912,12 @@ "icon": "{}/app_icons/tvpaint.png", "host_name": "tvpaint", "environment": { - "PYPE_LOG_NO_COLORS": "True", - "__environment_keys__": { - "tvpaint": [ - "PYPE_LOG_NO_COLORS" - ] - } + "PYPE_LOG_NO_COLORS": "True" }, "variants": { "tvpaint_animation_11-64bits": { "enabled": true, - "label": "", "variant_label": "11 (64bits)", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\TVPaint Developpement\\TVPaint Animation 11 (64bits)\\TVPaint Animation 11 (64bits).exe" @@ -1233,17 +930,11 @@ "darwin": [], "linux": [] }, - "environment": { - "__environment_keys__": { - "tvpaint_animation_11-64bits": [] - } - } + "environment": {} }, "tvpaint_animation_11-32bits": { "enabled": true, - "label": "", "variant_label": "11 (32bits)", - "icon": "", "executables": { "windows": [ "C:\\Program Files (x86)\\TVPaint Developpement\\TVPaint Animation 11 (32bits)\\TVPaint Animation 11 (32bits).exe" @@ -1256,11 +947,7 @@ "darwin": [], "linux": [] }, - "environment": { - "__environment_keys__": { - "tvpaint_animation_11-32bits": [] - } - } + "environment": {} } } }, @@ -1273,22 +960,12 @@ "AVALON_PHOTOSHOP_WORKFILES_ON_LAUNCH": "1", "PYPE_LOG_NO_COLORS": "Yes", "WEBSOCKET_URL": "ws://localhost:8099/ws/", - "WORKFILES_SAVE_AS": "Yes", - "__environment_keys__": { - "photoshop": [ - "AVALON_PHOTOSHOP_WORKFILES_ON_LAUNCH", - "PYPE_LOG_NO_COLORS", - "WEBSOCKET_URL", - "WORKFILES_SAVE_AS" - ] - } + "WORKFILES_SAVE_AS": "Yes" }, "variants": { "photoshop_2020": { "enabled": true, - "label": "", "variant_label": "2020", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Adobe\\Adobe Photoshop 2020\\Photoshop.exe" @@ -1301,17 +978,11 @@ "darwin": [], "linux": [] }, - "environment": { - "__environment_keys__": { - "photoshop_2020": [] - } - } + "environment": {} }, "photoshop_2021": { "enabled": true, - "label": "", "variant_label": "2021", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Adobe\\Adobe Photoshop 2021\\Photoshop.exe" @@ -1324,11 +995,7 @@ "darwin": [], "linux": [] }, - "environment": { - "__environment_keys__": { - "photoshop_2021": [] - } - } + "environment": {} } } }, @@ -1341,22 +1008,12 @@ "AVALON_AFTEREFFECTS_WORKFILES_ON_LAUNCH": "1", "PYPE_LOG_NO_COLORS": "Yes", "WEBSOCKET_URL": "ws://localhost:8097/ws/", - "WORKFILES_SAVE_AS": "Yes", - "__environment_keys__": { - "aftereffects": [ - "AVALON_AFTEREFFECTS_WORKFILES_ON_LAUNCH", - "PYPE_LOG_NO_COLORS", - "WEBSOCKET_URL", - "WORKFILES_SAVE_AS" - ] - } + "WORKFILES_SAVE_AS": "Yes" }, "variants": { "aftereffects_2020": { "enabled": true, - "label": "", "variant_label": "2020", - "icon": "", "executables": { "windows": [ "" @@ -1369,17 +1026,11 @@ "darwin": [], "linux": [] }, - "environment": { - "__environment_keys__": { - "aftereffects_2020": [] - } - } + "environment": {} }, "aftereffects_2021": { "enabled": true, - "label": "", "variant_label": "2021", - "icon": "", "executables": { "windows": [ "C:\\Program Files\\Adobe\\Adobe After Effects 2021\\Support Files\\AfterFX.exe" @@ -1392,11 +1043,7 @@ "darwin": [], "linux": [] }, - "environment": { - "__environment_keys__": { - "aftereffects_2021": [] - } - } + "environment": {} } } }, @@ -1406,30 +1053,19 @@ "icon": "app_icons/celaction.png", "host_name": "celaction", "environment": { - "CELACTION_TEMPLATE": "{PYPE_ROOT}/pype/hosts/celaction/celaction_template_scene.scn", - "__environment_keys__": { - "celaction": [ - "CELACTION_TEMPLATE" - ] - } + "CELACTION_TEMPLATE": "{PYPE_ROOT}/pype/hosts/celaction/celaction_template_scene.scn" }, "variants": { "celation_Local": { "enabled": true, - "label": "", "variant_label": "Local", - "icon": "{}/app_icons/celaction_local.png", "executables": "", "arguments": { "windows": [], "darwin": [], "linux": [] }, - "environment": { - "__environment_keys__": { - "celation_Local": [] - } - } + "environment": {} } } }, @@ -1441,21 +1077,12 @@ "environment": { "AVALON_UNREAL_PLUGIN": "{PYPE_REPOS_ROOT}/avalon-unreal-integration", "PYPE_LOG_NO_COLORS": "True", - "QT_PREFERRED_BINDING": "PySide", - "__environment_keys__": { - "unreal": [ - "AVALON_UNREAL_PLUGIN", - "PYPE_LOG_NO_COLORS", - "QT_PREFERRED_BINDING" - ] - } + "QT_PREFERRED_BINDING": "PySide" }, "variants": { "unreal_4-24": { "enabled": true, - "label": "", "variant_label": "4.24", - "icon": "", "executables": { "windows": [], "darwin": [], @@ -1466,27 +1093,17 @@ "darwin": [], "linux": [] }, - "environment": { - "__environment_keys__": { - "unreal_4-24": [] - } - } + "environment": {} } } }, "shell": { "enabled": true, - "environment": { - "__environment_keys__": { - "shell": [] - } - }, + "environment": {}, "variants": { "python_python_3-7": { "enabled": true, - "label": "Python", "variant_label": "3.7", - "icon": "{}/app_icons/python.png", "executables": { "windows": [], "darwin": [], @@ -1497,17 +1114,11 @@ "darwin": [], "linux": [] }, - "environment": { - "__environment_keys__": { - "python_python_3-7": [] - } - } + "environment": {} }, "python_python_2-7": { "enabled": true, - "label": "Python", "variant_label": "2.7", - "icon": "{}/app_icons/python.png", "executables": { "windows": [], "darwin": [], @@ -1518,17 +1129,11 @@ "darwin": [], "linux": [] }, - "environment": { - "__environment_keys__": { - "python_python_2-7": [] - } - } + "environment": {} }, "terminal_terminal": { "enabled": true, - "label": "Terminal", "variant_label": "", - "icon": "", "executables": { "windows": [], "darwin": [], @@ -1539,11 +1144,7 @@ "darwin": [], "linux": [] }, - "environment": { - "__environment_keys__": { - "terminal_terminal": [] - } - } + "environment": {} } } }, @@ -1552,17 +1153,11 @@ "label": "DJV View", "icon": "{}/app_icons/djvView.png", "host_name": "", - "environment": { - "__environment_keys__": { - "djvview": [] - } - }, + "environment": {}, "variants": { "djvview_1-1": { "enabled": true, - "label": "", "variant_label": "1.1", - "icon": "", "executables": { "windows": [], "darwin": [], @@ -1573,11 +1168,7 @@ "darwin": [], "linux": [] }, - "environment": { - "__environment_keys__": { - "djvview_1-1": [] - } - } + "environment": {} } } } diff --git a/pype/settings/entities/enum_entity.py b/pype/settings/entities/enum_entity.py index c486de397e..e28fb7478f 100644 --- a/pype/settings/entities/enum_entity.py +++ b/pype/settings/entities/enum_entity.py @@ -133,12 +133,9 @@ class AppsEnumEntity(BaseEnumEntity): if enabled_entity and not enabled_entity.value: continue - _group_label = variant_entity["label"].value - if not _group_label: - _group_label = group_label variant_label = variant_entity["variant_label"].value - full_label = "{} {}".format(_group_label, variant_label) + full_label = "{} {}".format(group_label, variant_label) enum_items.append({variant_name: full_label}) valid_keys.add(variant_name) return enum_items, valid_keys diff --git a/pype/settings/entities/schemas/system_schema/host_settings/schema_aftereffects.json b/pype/settings/entities/schemas/system_schema/host_settings/schema_aftereffects.json index 6e1ba352fc..cd080bf0f2 100644 --- a/pype/settings/entities/schemas/system_schema/host_settings/schema_aftereffects.json +++ b/pype/settings/entities/schemas/system_schema/host_settings/schema_aftereffects.json @@ -17,8 +17,7 @@ { "key": "environment", "label": "Environment", - "type": "raw-json", - "env_group_key": "aftereffects" + "type": "raw-json" }, { "type": "dict", diff --git a/pype/settings/entities/schemas/system_schema/host_settings/schema_blender.json b/pype/settings/entities/schemas/system_schema/host_settings/schema_blender.json index 5030f8280f..2501e94b50 100644 --- a/pype/settings/entities/schemas/system_schema/host_settings/schema_blender.json +++ b/pype/settings/entities/schemas/system_schema/host_settings/schema_blender.json @@ -17,8 +17,7 @@ { "key": "environment", "label": "Environment", - "type": "raw-json", - "env_group_key": "blender" + "type": "raw-json" }, { "type": "dict", diff --git a/pype/settings/entities/schemas/system_schema/host_settings/schema_celaction.json b/pype/settings/entities/schemas/system_schema/host_settings/schema_celaction.json index c5fe824f94..fbdad62a92 100644 --- a/pype/settings/entities/schemas/system_schema/host_settings/schema_celaction.json +++ b/pype/settings/entities/schemas/system_schema/host_settings/schema_celaction.json @@ -17,8 +17,7 @@ { "key": "environment", "label": "Environment", - "type": "raw-json", - "env_group_key": "celaction" + "type": "raw-json" }, { "type": "dict", diff --git a/pype/settings/entities/schemas/system_schema/host_settings/schema_djv.json b/pype/settings/entities/schemas/system_schema/host_settings/schema_djv.json index 3f3af3585a..381437d4ff 100644 --- a/pype/settings/entities/schemas/system_schema/host_settings/schema_djv.json +++ b/pype/settings/entities/schemas/system_schema/host_settings/schema_djv.json @@ -17,8 +17,7 @@ { "key": "environment", "label": "Environment", - "type": "raw-json", - "env_group_key": "djvview" + "type": "raw-json" }, { "type": "dict", diff --git a/pype/settings/entities/schemas/system_schema/host_settings/schema_fusion.json b/pype/settings/entities/schemas/system_schema/host_settings/schema_fusion.json index d693c39ffe..8661916d06 100644 --- a/pype/settings/entities/schemas/system_schema/host_settings/schema_fusion.json +++ b/pype/settings/entities/schemas/system_schema/host_settings/schema_fusion.json @@ -17,8 +17,7 @@ { "key": "environment", "label": "Environment", - "type": "raw-json", - "env_group_key": "fusion" + "type": "raw-json" }, { "type": "dict", diff --git a/pype/settings/entities/schemas/system_schema/host_settings/schema_harmony.json b/pype/settings/entities/schemas/system_schema/host_settings/schema_harmony.json index 8ad07c95ba..7c59b0febd 100644 --- a/pype/settings/entities/schemas/system_schema/host_settings/schema_harmony.json +++ b/pype/settings/entities/schemas/system_schema/host_settings/schema_harmony.json @@ -17,8 +17,7 @@ { "key": "environment", "label": "Environment", - "type": "raw-json", - "env_group_key": "harmony" + "type": "raw-json" }, { "type": "dict", diff --git a/pype/settings/entities/schemas/system_schema/host_settings/schema_houdini.json b/pype/settings/entities/schemas/system_schema/host_settings/schema_houdini.json index 7698cb4cc1..70e06d170d 100644 --- a/pype/settings/entities/schemas/system_schema/host_settings/schema_houdini.json +++ b/pype/settings/entities/schemas/system_schema/host_settings/schema_houdini.json @@ -17,8 +17,7 @@ { "key": "environment", "label": "Environment", - "type": "raw-json", - "env_group_key": "houdini" + "type": "raw-json" }, { "type": "dict", diff --git a/pype/settings/entities/schemas/system_schema/host_settings/schema_maya.json b/pype/settings/entities/schemas/system_schema/host_settings/schema_maya.json index d8396b16cb..07c8aa0106 100644 --- a/pype/settings/entities/schemas/system_schema/host_settings/schema_maya.json +++ b/pype/settings/entities/schemas/system_schema/host_settings/schema_maya.json @@ -17,8 +17,7 @@ { "key": "environment", "label": "Environment", - "type": "raw-json", - "env_group_key": "maya" + "type": "raw-json" }, { "type": "dict", diff --git a/pype/settings/entities/schemas/system_schema/host_settings/schema_mayabatch.json b/pype/settings/entities/schemas/system_schema/host_settings/schema_mayabatch.json index af7cc3d301..bea59656af 100644 --- a/pype/settings/entities/schemas/system_schema/host_settings/schema_mayabatch.json +++ b/pype/settings/entities/schemas/system_schema/host_settings/schema_mayabatch.json @@ -17,8 +17,7 @@ { "key": "environment", "label": "Environment", - "type": "raw-json", - "env_group_key": "mayabatch" + "type": "raw-json" }, { "type": "dict", diff --git a/pype/settings/entities/schemas/system_schema/host_settings/schema_photoshop.json b/pype/settings/entities/schemas/system_schema/host_settings/schema_photoshop.json index a8e3574aa3..6f67e29df2 100644 --- a/pype/settings/entities/schemas/system_schema/host_settings/schema_photoshop.json +++ b/pype/settings/entities/schemas/system_schema/host_settings/schema_photoshop.json @@ -17,8 +17,7 @@ { "key": "environment", "label": "Environment", - "type": "raw-json", - "env_group_key": "photoshop" + "type": "raw-json" }, { "type": "dict", diff --git a/pype/settings/entities/schemas/system_schema/host_settings/schema_resolve.json b/pype/settings/entities/schemas/system_schema/host_settings/schema_resolve.json index 052a935410..644e3046ce 100644 --- a/pype/settings/entities/schemas/system_schema/host_settings/schema_resolve.json +++ b/pype/settings/entities/schemas/system_schema/host_settings/schema_resolve.json @@ -17,8 +17,7 @@ { "key": "environment", "label": "Environment", - "type": "raw-json", - "env_group_key": "resolve" + "type": "raw-json" }, { "type": "dict", diff --git a/pype/settings/entities/schemas/system_schema/host_settings/schema_shell.json b/pype/settings/entities/schemas/system_schema/host_settings/schema_shell.json index 3288fe2ffb..f2f9376029 100644 --- a/pype/settings/entities/schemas/system_schema/host_settings/schema_shell.json +++ b/pype/settings/entities/schemas/system_schema/host_settings/schema_shell.json @@ -13,8 +13,7 @@ { "key": "environment", "label": "Environment", - "type": "raw-json", - "env_group_key": "shell" + "type": "raw-json" }, { "type": "dict", diff --git a/pype/settings/entities/schemas/system_schema/host_settings/schema_tvpaint.json b/pype/settings/entities/schemas/system_schema/host_settings/schema_tvpaint.json index a3cc6188ac..fa28c4448c 100644 --- a/pype/settings/entities/schemas/system_schema/host_settings/schema_tvpaint.json +++ b/pype/settings/entities/schemas/system_schema/host_settings/schema_tvpaint.json @@ -17,8 +17,7 @@ { "key": "environment", "label": "Environment", - "type": "raw-json", - "env_group_key": "tvpaint" + "type": "raw-json" }, { "type": "dict", diff --git a/pype/settings/entities/schemas/system_schema/host_settings/schema_unreal.json b/pype/settings/entities/schemas/system_schema/host_settings/schema_unreal.json index c79f08b71a..e9d1b68130 100644 --- a/pype/settings/entities/schemas/system_schema/host_settings/schema_unreal.json +++ b/pype/settings/entities/schemas/system_schema/host_settings/schema_unreal.json @@ -17,8 +17,7 @@ { "key": "environment", "label": "Environment", - "type": "raw-json", - "env_group_key": "unreal" + "type": "raw-json" }, { "type": "dict", diff --git a/pype/settings/entities/schemas/system_schema/host_settings/template_host_variant.json b/pype/settings/entities/schemas/system_schema/host_settings/template_host_variant.json index c809891b30..10aab06466 100644 --- a/pype/settings/entities/schemas/system_schema/host_settings/template_host_variant.json +++ b/pype/settings/entities/schemas/system_schema/host_settings/template_host_variant.json @@ -17,13 +17,6 @@ "key": "enabled", "label": "Enabled" }, - { - "type": "text", - "key": "label", - "label": "Label", - "placeholder": "Used from host label if not filled.", - "roles": ["developer"] - }, { "type": "text", "key": "variant_label", @@ -31,13 +24,6 @@ "placeholder": "Only \"Label\" is used if not filled.", "roles": ["developer"] }, - { - "type": "text", - "key": "icon", - "label": "Icon", - "placeholder": "Host icon path template. Used from host if not filled.", - "roles": ["developer"] - }, { "type": "path", "key": "executables", @@ -77,8 +63,7 @@ { "key": "environment", "label": "Environment", - "type": "raw-json", - "env_group_key": "{app_name}_{app_variant}" + "type": "raw-json" } ] } diff --git a/pype/settings/entities/schemas/system_schema/host_settings/template_nuke.json b/pype/settings/entities/schemas/system_schema/host_settings/template_nuke.json index c86c2aef61..d99e0b9a85 100644 --- a/pype/settings/entities/schemas/system_schema/host_settings/template_nuke.json +++ b/pype/settings/entities/schemas/system_schema/host_settings/template_nuke.json @@ -18,8 +18,7 @@ { "key": "environment", "label": "Environment", - "type": "raw-json", - "env_group_key": "{nuke_type}" + "type": "raw-json" }, { "type": "dict", diff --git a/pype/tools/launcher/models.py b/pype/tools/launcher/models.py index d1742014ef..c617c7cace 100644 --- a/pype/tools/launcher/models.py +++ b/pype/tools/launcher/models.py @@ -162,9 +162,9 @@ class ActionModel(QtGui.QStandardItemModel): (ApplicationAction,), { "application": app, - "name": app.app_name, - "label": app.label, - "label_variant": app.variant_label, + "name": app.name, + "label": app.group.label, + "label_variant": app.label, "group": None, "icon": app.icon, "color": getattr(app, "color", None),