mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merge branch 'develop' into feature/OP-2983_simple-texture-publishing
This commit is contained in:
commit
3282720b4e
25 changed files with 351 additions and 214 deletions
|
|
@ -8,11 +8,11 @@ M_ENVIRONMENT_KEY = "__environment_keys__"
|
|||
# Metadata key for storing dynamic created labels
|
||||
M_DYNAMIC_KEY_LABEL = "__dynamic_keys_labels__"
|
||||
|
||||
METADATA_KEYS = (
|
||||
METADATA_KEYS = frozenset([
|
||||
M_OVERRIDDEN_KEY,
|
||||
M_ENVIRONMENT_KEY,
|
||||
M_DYNAMIC_KEY_LABEL
|
||||
)
|
||||
])
|
||||
|
||||
# Keys where studio's system overrides are stored
|
||||
GLOBAL_SETTINGS_KEY = "global_settings"
|
||||
|
|
|
|||
|
|
@ -25,10 +25,18 @@
|
|||
},
|
||||
"variants": {
|
||||
"3-2": {
|
||||
"MTOA_VERSION": "3.2"
|
||||
"host_names": [],
|
||||
"app_variants": [],
|
||||
"environment": {
|
||||
"MTOA_VERSION": "3.2"
|
||||
}
|
||||
},
|
||||
"3-1": {
|
||||
"MTOA_VERSION": "3.1"
|
||||
"host_names": [],
|
||||
"app_variants": [],
|
||||
"environment": {
|
||||
"MTOA_VERSION": "3.1"
|
||||
}
|
||||
},
|
||||
"__dynamic_keys_labels__": {
|
||||
"3-2": "3.2",
|
||||
|
|
|
|||
|
|
@ -25,7 +25,30 @@
|
|||
"key": "variants",
|
||||
"collapsible_key": true,
|
||||
"object_type": {
|
||||
"type": "raw-json"
|
||||
"type": "dict",
|
||||
"children": [
|
||||
{
|
||||
"key": "host_names",
|
||||
"label": "Hosts",
|
||||
"type": "hosts-enum",
|
||||
"multiselection": true
|
||||
},
|
||||
{
|
||||
"key": "app_variants",
|
||||
"label": "Applications",
|
||||
"type": "apps-enum",
|
||||
"multiselection": true,
|
||||
"tooltip": "Applications are not \"live\" and may require to Save and refresh settings UI to update values."
|
||||
},
|
||||
{
|
||||
"type": "separator"
|
||||
},
|
||||
{
|
||||
"key": "environment",
|
||||
"label": "Environments",
|
||||
"type": "raw-json"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -265,11 +265,43 @@ def save_project_anatomy(project_name, anatomy_data):
|
|||
raise SaveWarningExc(warnings)
|
||||
|
||||
|
||||
def _system_settings_backwards_compatible_conversion(studio_overrides):
|
||||
# Backwards compatibility of tools 3.9.1 - 3.9.2 to keep
|
||||
# "tools" environments
|
||||
if (
|
||||
"tools" in studio_overrides
|
||||
and "tool_groups" in studio_overrides["tools"]
|
||||
):
|
||||
tool_groups = studio_overrides["tools"]["tool_groups"]
|
||||
for tool_group, group_value in tool_groups.items():
|
||||
if tool_group in METADATA_KEYS:
|
||||
continue
|
||||
|
||||
variants = group_value.get("variants")
|
||||
if not variants:
|
||||
continue
|
||||
|
||||
for key in set(variants.keys()):
|
||||
if key in METADATA_KEYS:
|
||||
continue
|
||||
|
||||
variant_value = variants[key]
|
||||
if "environment" not in variant_value:
|
||||
variants[key] = {
|
||||
"environment": variant_value
|
||||
}
|
||||
|
||||
|
||||
@require_handler
|
||||
def get_studio_system_settings_overrides(return_version=False):
|
||||
return _SETTINGS_HANDLER.get_studio_system_settings_overrides(
|
||||
output = _SETTINGS_HANDLER.get_studio_system_settings_overrides(
|
||||
return_version
|
||||
)
|
||||
value = output
|
||||
if return_version:
|
||||
value, version = output
|
||||
_system_settings_backwards_compatible_conversion(value)
|
||||
return output
|
||||
|
||||
|
||||
@require_handler
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue