From 6f8367a6818ba2e958c57aa326c268ec081ddb75 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Wed, 31 Mar 2021 16:22:02 +0200 Subject: [PATCH 01/12] removed app_name from variant's key --- .../system_schema/host_settings/template_host_variant.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 10aab06466..50af69e61e 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 @@ -7,7 +7,7 @@ }, { "type": "dict", - "key": "{app_name}_{app_variant}", + "key": "{app_variant}", "label": "{app_variant_label}", "collapsible": true, "checkbox_key": "enabled", From 4ebe34dd3f0c49dde5253299482d9f388e22000c Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Wed, 31 Mar 2021 16:22:48 +0200 Subject: [PATCH 02/12] don't pass app_name to host variant template --- .../host_settings/schema_aftereffects.json | 6 ++---- .../system_schema/host_settings/schema_blender.json | 6 ++---- .../host_settings/schema_celaction.json | 1 - .../system_schema/host_settings/schema_djv.json | 3 +-- .../system_schema/host_settings/schema_fusion.json | 6 ++---- .../system_schema/host_settings/schema_harmony.json | 6 ++---- .../system_schema/host_settings/schema_houdini.json | 9 +++------ .../system_schema/host_settings/schema_maya.json | 9 +++------ .../host_settings/schema_mayabatch.json | 9 +++------ .../host_settings/schema_photoshop.json | 6 ++---- .../system_schema/host_settings/schema_resolve.json | 3 +-- .../system_schema/host_settings/schema_shell.json | 9 +++------ .../system_schema/host_settings/schema_tvpaint.json | 6 ++---- .../system_schema/host_settings/schema_unreal.json | 3 +-- .../system_schema/host_settings/template_nuke.json | 12 ++++-------- 15 files changed, 31 insertions(+), 63 deletions(-) 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 cd080bf0f2..afadf48173 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 @@ -29,13 +29,11 @@ "template_data": [ { "app_variant_label": "2020", - "app_variant": "2020", - "app_name": "aftereffects" + "app_variant": "2020" }, { "app_variant_label": "2021", - "app_variant": "2021", - "app_name": "aftereffects" + "app_variant": "2021" } ] } 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 2501e94b50..98d0f99843 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 @@ -29,13 +29,11 @@ "template_data": [ { "app_variant_label": "2.83", - "app_variant": "2-83", - "app_name": "blender" + "app_variant": "2-83" }, { "app_variant_label": "2.90", - "app_variant": "2-90", - "app_name": "blender" + "app_variant": "2-90" } ] } 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 fbdad62a92..f0efab2aed 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 @@ -30,7 +30,6 @@ { "app_variant_label": "Local", "app_variant": "Local", - "app_name": "celation", "multiplatform": false, "multipath_executables": false } 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 381437d4ff..9698266bca 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 @@ -28,8 +28,7 @@ "name": "template_host_variant", "template_data": { "app_variant_label": "1.1", - "app_variant": "1-1", - "app_name": "djvview" + "app_variant": "1-1" } } ] 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 8661916d06..58f37fa99b 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 @@ -29,13 +29,11 @@ "template_data": [ { "app_variant_label": "16", - "app_variant": "16", - "app_name": "fusion" + "app_variant": "16" }, { "app_variant_label": "9", - "app_variant": "9", - "app_name": "fusion" + "app_variant": "9" } ] } 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 7c59b0febd..083885a53b 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 @@ -29,13 +29,11 @@ "template_data": [ { "app_variant_label": "20", - "app_variant": "20", - "app_name": "harmony" + "app_variant": "20" }, { "app_variant_label": "17", - "app_variant": "17", - "app_name": "harmony" + "app_variant": "17" } ] } 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 70e06d170d..a6d2103dbe 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 @@ -29,18 +29,15 @@ "template_data": [ { "app_variant_label": "18.5", - "app_variant": "18-5", - "app_name": "houdini" + "app_variant": "18-5" }, { "app_variant_label": "18", - "app_variant": "18", - "app_name": "houdini" + "app_variant": "18" }, { "app_variant_label": "17", - "app_variant": "17", - "app_name": "houdini" + "app_variant": "17" } ] } 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 07c8aa0106..007ebb4d62 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 @@ -29,18 +29,15 @@ "template_data": [ { "app_variant_label": "2020", - "app_variant": "2020", - "app_name": "maya" + "app_variant": "2020" }, { "app_variant_label": "2019", - "app_variant": "2019", - "app_name": "maya" + "app_variant": "2019" }, { "app_variant_label": "2018", - "app_variant": "2018", - "app_name": "maya" + "app_variant": "2018" } ] } 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 bea59656af..bdeca9089c 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 @@ -29,18 +29,15 @@ "template_data": [ { "app_variant_label": "2020", - "app_variant": "2020", - "app_name": "mayabatch" + "app_variant": "2020" }, { "app_variant_label": "2019", - "app_variant": "2019", - "app_name": "mayabatch" + "app_variant": "2019" }, { "app_variant_label": "2018", - "app_variant": "2018", - "app_name": "mayabatch" + "app_variant": "2018" } ] } 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 6f67e29df2..9c21166b63 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 @@ -29,13 +29,11 @@ "template_data": [ { "app_variant_label": "2020", - "app_variant": "2020", - "app_name": "photoshop" + "app_variant": "2020" }, { "app_variant_label": "2021", - "app_variant": "2021", - "app_name": "photoshop" + "app_variant": "2021" } ] } 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 644e3046ce..ab2b86bf87 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 @@ -29,8 +29,7 @@ "template_data": [ { "app_variant_label": "16", - "app_variant": "16", - "app_name": "resolve" + "app_variant": "16" } ] } 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 f2f9376029..1e356154fd 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 @@ -25,18 +25,15 @@ "template_data": [ { "app_variant": "python_3-7", - "app_variant_label": "Python 3.7", - "app_name": "python" + "app_variant_label": "Python 3.7" }, { "app_variant": "python_2-7", - "app_variant_label": "Python 2.7", - "app_name": "python" + "app_variant_label": "Python 2.7" }, { "app_variant": "terminal", - "app_variant_label": "Terminal", - "app_name": "terminal" + "app_variant_label": "Terminal" } ] } 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 fa28c4448c..8f8c2c5ac5 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 @@ -29,13 +29,11 @@ "template_data": [ { "app_variant_label": "Animation 11 (64bits)", - "app_variant": "animation_11-64bits", - "app_name": "tvpaint" + "app_variant": "animation_11-64bits" }, { "app_variant_label": "Animation 11 (32bits)", - "app_variant": "animation_11-32bits", - "app_name": "tvpaint" + "app_variant": "animation_11-32bits" } ] } 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 e9d1b68130..3cf3005e70 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 @@ -29,8 +29,7 @@ "template_data": [ { "app_variant": "4-24", - "app_variant_label": "4.24", - "app_name": "unreal" + "app_variant_label": "4.24" } ] } 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 d99e0b9a85..737a695e1b 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 @@ -30,23 +30,19 @@ "template_data": [ { "app_variant": "12-2", - "app_variant_label": "12.2", - "app_name": "{nuke_type}" + "app_variant_label": "12.2" }, { "app_variant": "12-0", - "app_variant_label": "12.0", - "app_name": "{nuke_type}" + "app_variant_label": "12.0" }, { "app_variant": "11-3", - "app_variant_label": "11.3", - "app_name": "{nuke_type}" + "app_variant_label": "11.3" }, { "app_variant": "11-2", - "app_variant_label": "11.2", - "app_name": "{nuke_type}" + "app_variant_label": "11.2" } ] } From 7553b944880541dc17d417a3b80b57c5ca940631 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Wed, 31 Mar 2021 16:23:23 +0200 Subject: [PATCH 03/12] applications enum is using full name of application instead of only variant name --- pype/settings/entities/enum_entity.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pype/settings/entities/enum_entity.py b/pype/settings/entities/enum_entity.py index e28fb7478f..919fd3178e 100644 --- a/pype/settings/entities/enum_entity.py +++ b/pype/settings/entities/enum_entity.py @@ -117,7 +117,8 @@ class AppsEnumEntity(BaseEnumEntity): valid_keys = set() enum_items = [] - for app_group in system_settings_entity["applications"].values(): + applications_entity = system_settings_entity["applications"] + for group_name, app_group in applications_entity.items(): enabled_entity = app_group.get("enabled") if enabled_entity and not enabled_entity.value: continue @@ -134,10 +135,14 @@ class AppsEnumEntity(BaseEnumEntity): continue variant_label = variant_entity["variant_label"].value + if group_label: + full_label = "{} {}".format(group_label, variant_label) + else: + full_label = variant_label - full_label = "{} {}".format(group_label, variant_label) - enum_items.append({variant_name: full_label}) - valid_keys.add(variant_name) + full_name = "/".join((group_name, variant_name)) + enum_items.append({full_name: full_label}) + valid_keys.add(full_name) return enum_items, valid_keys def set_override_state(self, *args, **kwargs): From 060f0b6463748b13b0f82a31ed074cee99860157 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Wed, 31 Mar 2021 16:24:27 +0200 Subject: [PATCH 04/12] resaved defaults with new variants --- .../system_settings/applications.json | 88 +++++++++---------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/pype/settings/defaults/system_settings/applications.json b/pype/settings/defaults/system_settings/applications.json index 5eccdfb83d..0a9edf0f2e 100644 --- a/pype/settings/defaults/system_settings/applications.json +++ b/pype/settings/defaults/system_settings/applications.json @@ -19,7 +19,7 @@ "PYPE_LOG_NO_COLORS": "Yes" }, "variants": { - "maya_2020": { + "2020": { "enabled": true, "variant_label": "2020", "executables": { @@ -40,7 +40,7 @@ "MAYA_VERSION": "2020" } }, - "maya_2019": { + "2019": { "enabled": true, "variant_label": "2019", "executables": { @@ -61,7 +61,7 @@ "MAYA_VERSION": "2019" } }, - "maya_2018": { + "2018": { "enabled": true, "variant_label": "2018", "executables": { @@ -105,7 +105,7 @@ "MAYA_TEST": "{MAYA_VERSION}" }, "variants": { - "mayabatch_2020": { + "2020": { "enabled": true, "variant_label": "2020", "executables": { @@ -124,7 +124,7 @@ "MAYA_VERSION": "2020" } }, - "mayabatch_2019": { + "2019": { "enabled": true, "variant_label": "2019", "executables": { @@ -143,7 +143,7 @@ "MAYA_VERSION": "2019" } }, - "mayabatch_2018": { + "2018": { "enabled": true, "variant_label": "2018", "executables": { @@ -181,7 +181,7 @@ "LOGLEVEL": "DEBUG" }, "variants": { - "nuke_12-2": { + "12-2": { "enabled": true, "variant_label": "12.2", "executables": { @@ -200,7 +200,7 @@ }, "environment": {} }, - "nuke_12-0": { + "12-0": { "enabled": true, "variant_label": "12.0", "executables": { @@ -219,7 +219,7 @@ }, "environment": {} }, - "nuke_11-3": { + "11-3": { "enabled": true, "variant_label": "11.3", "executables": { @@ -238,7 +238,7 @@ }, "environment": {} }, - "nuke_11-2": { + "11-2": { "enabled": true, "variant_label": "11.2", "executables": { @@ -274,7 +274,7 @@ "LOGLEVEL": "DEBUG" }, "variants": { - "nukex_12-2": { + "12-2": { "enabled": true, "variant_label": "12.2", "executables": { @@ -299,7 +299,7 @@ }, "environment": {} }, - "nukex_12-0": { + "12-0": { "enabled": true, "variant_label": "12.0", "executables": { @@ -324,7 +324,7 @@ }, "environment": {} }, - "nukex_11-3": { + "11-3": { "enabled": true, "variant_label": "11.3", "executables": { @@ -349,7 +349,7 @@ }, "environment": {} }, - "nukex_11-2": { + "11-2": { "enabled": true, "variant_label": "11.2", "executables": { @@ -391,7 +391,7 @@ "LOGLEVEL": "DEBUG" }, "variants": { - "nukestudio_12-2": { + "12-2": { "enabled": true, "variant_label": "12.2", "executables": { @@ -416,7 +416,7 @@ }, "environment": {} }, - "nukestudio_12-0": { + "12-0": { "enabled": true, "variant_label": "12.0", "executables": { @@ -441,7 +441,7 @@ }, "environment": {} }, - "nukestudio_11-3": { + "11-3": { "enabled": true, "variant_label": "11.3", "executables": { @@ -466,7 +466,7 @@ }, "environment": {} }, - "nukestudio_11-2": { + "11-2": { "enabled": true, "variant_label": "11.2", "executables": { @@ -506,7 +506,7 @@ "LOGLEVEL": "DEBUG" }, "variants": { - "hiero_12-2": { + "12-2": { "enabled": true, "variant_label": "12.2", "executables": { @@ -531,7 +531,7 @@ }, "environment": {} }, - "hiero_12-0": { + "12-0": { "enabled": true, "variant_label": "12.0", "executables": { @@ -556,7 +556,7 @@ }, "environment": {} }, - "hiero_11-3": { + "11-3": { "enabled": true, "variant_label": "11.3", "executables": { @@ -581,7 +581,7 @@ }, "environment": {} }, - "hiero_11-2": { + "11-2": { "enabled": true, "variant_label": "11.2", "executables": { @@ -636,7 +636,7 @@ "PYPE_LOG_NO_COLORS": "Yes" }, "variants": { - "fusion_16": { + "16": { "enabled": true, "variant_label": "16", "executables": { @@ -651,7 +651,7 @@ }, "environment": {} }, - "fusion_9": { + "9": { "enabled": true, "variant_label": "9", "executables": { @@ -714,7 +714,7 @@ "RESOLVE_DEV": "True" }, "variants": { - "resolve_16": { + "16": { "enabled": true, "variant_label": "16", "executables": { @@ -751,7 +751,7 @@ } }, "variants": { - "houdini_18-5": { + "18-5": { "enabled": true, "variant_label": "18.5", "executables": { @@ -768,7 +768,7 @@ }, "environment": {} }, - "houdini_18": { + "18": { "enabled": true, "variant_label": "18", "executables": { @@ -783,7 +783,7 @@ }, "environment": {} }, - "houdini_17": { + "17": { "enabled": true, "variant_label": "17", "executables": { @@ -814,7 +814,7 @@ "CREATE_NEW_CONSOLE": "yes" }, "variants": { - "blender_2-83": { + "2-83": { "enabled": true, "variant_label": "2.83", "executables": { @@ -837,7 +837,7 @@ }, "environment": {} }, - "blender_2-90": { + "2-90": { "enabled": true, "variant_label": "2.90", "executables": { @@ -872,7 +872,7 @@ "LIB_OPENHARMONY_PATH": "{PYPE_ROOT}/pype/vendor/OpenHarmony" }, "variants": { - "harmony_20": { + "20": { "enabled": true, "variant_label": "20", "executables": { @@ -887,7 +887,7 @@ }, "environment": {} }, - "harmony_17": { + "17": { "enabled": true, "variant_label": "17", "executables": { @@ -915,7 +915,7 @@ "PYPE_LOG_NO_COLORS": "True" }, "variants": { - "tvpaint_animation_11-64bits": { + "animation_11-64bits": { "enabled": true, "variant_label": "11 (64bits)", "executables": { @@ -932,7 +932,7 @@ }, "environment": {} }, - "tvpaint_animation_11-32bits": { + "animation_11-32bits": { "enabled": true, "variant_label": "11 (32bits)", "executables": { @@ -963,7 +963,7 @@ "WORKFILES_SAVE_AS": "Yes" }, "variants": { - "photoshop_2020": { + "2020": { "enabled": true, "variant_label": "2020", "executables": { @@ -980,7 +980,7 @@ }, "environment": {} }, - "photoshop_2021": { + "2021": { "enabled": true, "variant_label": "2021", "executables": { @@ -1011,7 +1011,7 @@ "WORKFILES_SAVE_AS": "Yes" }, "variants": { - "aftereffects_2020": { + "2020": { "enabled": true, "variant_label": "2020", "executables": { @@ -1028,7 +1028,7 @@ }, "environment": {} }, - "aftereffects_2021": { + "2021": { "enabled": true, "variant_label": "2021", "executables": { @@ -1056,7 +1056,7 @@ "CELACTION_TEMPLATE": "{PYPE_ROOT}/pype/hosts/celaction/celaction_template_scene.scn" }, "variants": { - "celation_Local": { + "Local": { "enabled": true, "variant_label": "Local", "executables": "", @@ -1080,7 +1080,7 @@ "QT_PREFERRED_BINDING": "PySide" }, "variants": { - "unreal_4-24": { + "4-24": { "enabled": true, "variant_label": "4.24", "executables": { @@ -1101,7 +1101,7 @@ "enabled": true, "environment": {}, "variants": { - "python_python_3-7": { + "python_3-7": { "enabled": true, "variant_label": "3.7", "executables": { @@ -1116,7 +1116,7 @@ }, "environment": {} }, - "python_python_2-7": { + "python_2-7": { "enabled": true, "variant_label": "2.7", "executables": { @@ -1131,7 +1131,7 @@ }, "environment": {} }, - "terminal_terminal": { + "terminal": { "enabled": true, "variant_label": "", "executables": { @@ -1155,7 +1155,7 @@ "host_name": "", "environment": {}, "variants": { - "djvview_1-1": { + "1-1": { "enabled": true, "variant_label": "1.1", "executables": { From 00bc01ba22696f3e9a1d64957f1b9780b6981e40 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Wed, 31 Mar 2021 16:48:07 +0200 Subject: [PATCH 05/12] use `full_name` of application to be used for storing and usage --- pype/lib/applications.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pype/lib/applications.py b/pype/lib/applications.py index 6df296db95..32b5785e06 100644 --- a/pype/lib/applications.py +++ b/pype/lib/applications.py @@ -244,7 +244,7 @@ class Application: Returns: subprocess.Popen: Return executed process as Popen object. """ - return self.manager.launch(self.name, *args, **kwargs) + return self.manager.launch(self.full_name, *args, **kwargs) class ApplicationManager: @@ -273,7 +273,7 @@ class ApplicationManager: 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 + self.applications[app.full_name] = app tools_definitions = settings["tools"]["tool_groups"] for tool_group_name, tool_group_data in tools_definitions.items(): @@ -502,7 +502,7 @@ class LaunchHook: @property def app_name(self): - return getattr(self.application, "name", None) + return getattr(self.application, "full_name", None) def validate(self): """Optional validation of launch hook on initialization. @@ -939,7 +939,7 @@ def get_app_environments_for_context( "project_name": project_name, "asset_name": asset_name, "task_name": task_name, - "app_name": app_name, + "app": app, "dbcon": dbcon, @@ -1117,8 +1117,7 @@ def prepare_context_environments(data): "AVALON_ASSET": asset_doc["name"], "AVALON_TASK": task_name, "AVALON_APP": app.host_name, - # TODO this hould be `app.full_name` in future PRs - "AVALON_APP_NAME": app.name, + "AVALON_APP_NAME": app.full_name, "AVALON_WORKDIR": workdir } log.debug( From dd749fcbe4cc70bf507ee81ab6d440f70a8e06d1 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Wed, 31 Mar 2021 16:48:40 +0200 Subject: [PATCH 06/12] fixed splitting of app name in premiere extension --- pype/hosts/premiere/extensions/com.pype/jsx/pype.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pype/hosts/premiere/extensions/com.pype/jsx/pype.jsx b/pype/hosts/premiere/extensions/com.pype/jsx/pype.jsx index 3cd4502653..20987da772 100644 --- a/pype/hosts/premiere/extensions/com.pype/jsx/pype.jsx +++ b/pype/hosts/premiere/extensions/com.pype/jsx/pype.jsx @@ -524,7 +524,7 @@ $.pype = { currentFile: $.pype.convertPathString(app.project.path), framerate: (1 / settings.videoFrameRate.seconds), host: $.getenv('AVALON_APP'), - hostVersion: $.getenv('AVALON_APP_NAME').split('_')[1], + hostVersion: $.getenv('AVALON_APP_NAME').split('/')[1], cwd: $.pype.convertPathString(app.project.path).split('\\').slice(0, -1).join('\\') }; var sendInstances = []; From 7884094c5e0b6fc96e34d9d5cdaf275c1643b2ab Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Wed, 31 Mar 2021 16:48:57 +0200 Subject: [PATCH 07/12] changed hardcoded app name of celaction --- pype/hosts/celaction/api/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pype/hosts/celaction/api/cli.py b/pype/hosts/celaction/api/cli.py index f77bdea451..94e8dfd389 100644 --- a/pype/hosts/celaction/api/cli.py +++ b/pype/hosts/celaction/api/cli.py @@ -77,7 +77,7 @@ def _prepare_publish_environments(): env["AVALON_HIERARCHY"] = hierarchy env["AVALON_PROJECTCODE"] = project_doc["data"].get("code", "") env["AVALON_APP"] = f"hosts.{publish_host}" - env["AVALON_APP_NAME"] = "celaction_local" + env["AVALON_APP_NAME"] = "celaction/Local" env["PYBLISH_HOSTS"] = publish_host From e40d63d3ba297a6ab0419e325f72a986f017c729 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Wed, 31 Mar 2021 18:05:25 +0200 Subject: [PATCH 08/12] all app variants paths are multiplatform with multipaths --- .../defaults/system_settings/applications.json | 6 +++++- .../host_settings/schema_celaction.json | 2 -- .../host_settings/template_host_variant.json | 13 +++---------- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/pype/settings/defaults/system_settings/applications.json b/pype/settings/defaults/system_settings/applications.json index 0a9edf0f2e..de353cb703 100644 --- a/pype/settings/defaults/system_settings/applications.json +++ b/pype/settings/defaults/system_settings/applications.json @@ -1059,7 +1059,11 @@ "Local": { "enabled": true, "variant_label": "Local", - "executables": "", + "executables": { + "windows": [], + "darwin": [], + "linux": [] + }, "arguments": { "windows": [], "darwin": [], 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 f0efab2aed..4b7af872be 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 @@ -30,8 +30,6 @@ { "app_variant_label": "Local", "app_variant": "Local", - "multiplatform": false, - "multipath_executables": false } ] } 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 50af69e61e..63d3d9413d 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 @@ -1,10 +1,4 @@ [ - { - "__default_values__": { - "multipath_executables": true, - "multiplatform": true - } - }, { "type": "dict", "key": "{app_variant}", @@ -21,15 +15,14 @@ "type": "text", "key": "variant_label", "label": "Variant label", - "placeholder": "Only \"Label\" is used if not filled.", - "roles": ["developer"] + "placeholder": "Only \"Label\" is used if not filled." }, { "type": "path", "key": "executables", "label": "Executables", - "multiplatform": "{multiplatform}", - "multipath": "{multipath_executables}" + "multiplatform": true, + "multipath": true }, { "type":"separator" From 8222109ae17fa321efb3da935d4062c73f124a7d Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Wed, 31 Mar 2021 18:08:39 +0200 Subject: [PATCH 09/12] change celation variant name from `Local` to `local` --- pype/hosts/celaction/api/cli.py | 2 +- .../schemas/system_schema/host_settings/schema_celaction.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pype/hosts/celaction/api/cli.py b/pype/hosts/celaction/api/cli.py index 94e8dfd389..6234970982 100644 --- a/pype/hosts/celaction/api/cli.py +++ b/pype/hosts/celaction/api/cli.py @@ -77,7 +77,7 @@ def _prepare_publish_environments(): env["AVALON_HIERARCHY"] = hierarchy env["AVALON_PROJECTCODE"] = project_doc["data"].get("code", "") env["AVALON_APP"] = f"hosts.{publish_host}" - env["AVALON_APP_NAME"] = "celaction/Local" + env["AVALON_APP_NAME"] = "celaction/local" env["PYBLISH_HOSTS"] = publish_host 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 4b7af872be..82be15c3b0 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 @@ -29,7 +29,7 @@ "template_data": [ { "app_variant_label": "Local", - "app_variant": "Local", + "app_variant": "local" } ] } From 850db6434750e412681f43037f8c595f2b620d73 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Wed, 31 Mar 2021 19:07:10 +0200 Subject: [PATCH 10/12] fix celaction key in defaults --- pype/settings/defaults/system_settings/applications.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pype/settings/defaults/system_settings/applications.json b/pype/settings/defaults/system_settings/applications.json index de353cb703..5cbd3e3d72 100644 --- a/pype/settings/defaults/system_settings/applications.json +++ b/pype/settings/defaults/system_settings/applications.json @@ -1056,7 +1056,7 @@ "CELACTION_TEMPLATE": "{PYPE_ROOT}/pype/hosts/celaction/celaction_template_scene.scn" }, "variants": { - "Local": { + "local": { "enabled": true, "variant_label": "Local", "executables": { From d7562637fd6c5dfd370b14cfed28c0b84b1112d4 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 1 Apr 2021 23:04:40 +0200 Subject: [PATCH 11/12] fix attribute name --- pype/lib/applications.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pype/lib/applications.py b/pype/lib/applications.py index 32b5785e06..c0cdee0d77 100644 --- a/pype/lib/applications.py +++ b/pype/lib/applications.py @@ -72,7 +72,7 @@ class ApplictionExecutableNotFound(Exception): for executable in application.executables: details += "\n- " + executable.executable_path - self.msg = msg.format(application.full_label, application.app_name) + self.msg = msg.format(application.full_label, application.full_name) self.details = details exc_mgs = str(self.msg) From 5dd58ba9c75371f45f4b40af6c5b46de933c2d88 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Wed, 7 Apr 2021 13:07:15 +0200 Subject: [PATCH 12/12] show full label of running action istead of name --- openpype/tools/launcher/window.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openpype/tools/launcher/window.py b/openpype/tools/launcher/window.py index a89e724f1c..c0aeec7d2f 100644 --- a/openpype/tools/launcher/window.py +++ b/openpype/tools/launcher/window.py @@ -11,6 +11,7 @@ from avalon.tools import lib as tools_lib from avalon.tools.widgets import AssetWidget from avalon.vendor import qtawesome from .models import ProjectModel +from .lib import get_action_label from .widgets import ( ProjectBar, ActionBar, @@ -407,7 +408,7 @@ class LauncherWindow(QtWidgets.QDialog): self.discover_actions() def on_action_clicked(self, action): - self.echo("Running action: {}".format(action.name)) + self.echo("Running action: {}".format(get_action_label(action))) self.run_action(action) def on_history_action(self, history_data):