mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
Merge branch 'develop' into enhancement/OP-6352_tycache-family
This commit is contained in:
commit
8078260fed
82 changed files with 4718 additions and 419 deletions
|
|
@ -290,6 +290,16 @@ def _convert_modules_system(
|
|||
modules_settings[key] = value
|
||||
|
||||
|
||||
def is_dev_mode_enabled():
|
||||
"""Dev mode is enabled in AYON.
|
||||
|
||||
Returns:
|
||||
bool: True if dev mode is enabled.
|
||||
"""
|
||||
|
||||
return os.getenv("AYON_USE_DEV") == "1"
|
||||
|
||||
|
||||
def convert_system_settings(ayon_settings, default_settings, addon_versions):
|
||||
default_settings = copy.deepcopy(default_settings)
|
||||
output = {
|
||||
|
|
@ -1400,15 +1410,39 @@ class _AyonSettingsCache:
|
|||
if _AyonSettingsCache.variant is None:
|
||||
from openpype.lib.openpype_version import is_staging_enabled
|
||||
|
||||
_AyonSettingsCache.variant = (
|
||||
"staging" if is_staging_enabled() else "production"
|
||||
)
|
||||
variant = "production"
|
||||
if is_dev_mode_enabled():
|
||||
variant = cls._get_dev_mode_settings_variant()
|
||||
elif is_staging_enabled():
|
||||
variant = "staging"
|
||||
_AyonSettingsCache.variant = variant
|
||||
return _AyonSettingsCache.variant
|
||||
|
||||
@classmethod
|
||||
def _get_bundle_name(cls):
|
||||
return os.environ["AYON_BUNDLE_NAME"]
|
||||
|
||||
@classmethod
|
||||
def _get_dev_mode_settings_variant(cls):
|
||||
"""Develop mode settings variant.
|
||||
|
||||
Returns:
|
||||
str: Name of settings variant.
|
||||
"""
|
||||
|
||||
bundles = ayon_api.get_bundles()
|
||||
user = ayon_api.get_user()
|
||||
username = user["name"]
|
||||
for bundle in bundles:
|
||||
if (
|
||||
bundle.get("isDev")
|
||||
and bundle.get("activeUser") == username
|
||||
):
|
||||
return bundle["name"]
|
||||
# Return fake variant - distribution logic will tell user that he
|
||||
# does not have set any dev bundle
|
||||
return "dev"
|
||||
|
||||
@classmethod
|
||||
def get_value_by_project(cls, project_name):
|
||||
cache_item = _AyonSettingsCache.cache_by_project_name[project_name]
|
||||
|
|
|
|||
|
|
@ -89,10 +89,10 @@
|
|||
"optional": true,
|
||||
"active": false
|
||||
},
|
||||
"ExtractABC": {
|
||||
"ExtractModelABC": {
|
||||
"enabled": true,
|
||||
"optional": true,
|
||||
"active": false
|
||||
"active": true
|
||||
},
|
||||
"ExtractBlendAnimation": {
|
||||
"enabled": true,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"general": {
|
||||
"add_self_publish_button": false,
|
||||
"update_houdini_var_context": {
|
||||
"enabled": true,
|
||||
"houdini_vars":[
|
||||
|
|
|
|||
|
|
@ -181,12 +181,12 @@
|
|||
"name": "template_publish_plugin",
|
||||
"template_data": [
|
||||
{
|
||||
"key": "ExtractFBX",
|
||||
"label": "Extract FBX (model and rig)"
|
||||
"key": "ExtractModelABC",
|
||||
"label": "Extract ABC (model)"
|
||||
},
|
||||
{
|
||||
"key": "ExtractABC",
|
||||
"label": "Extract ABC (model and pointcache)"
|
||||
"key": "ExtractFBX",
|
||||
"label": "Extract FBX (model and rig)"
|
||||
},
|
||||
{
|
||||
"key": "ExtractBlendAnimation",
|
||||
|
|
|
|||
|
|
@ -5,6 +5,11 @@
|
|||
"collapsible": true,
|
||||
"is_group": true,
|
||||
"children": [
|
||||
{
|
||||
"type": "boolean",
|
||||
"key": "add_self_publish_button",
|
||||
"label": "Add Self Publish Button"
|
||||
},
|
||||
{
|
||||
"type": "dict",
|
||||
"collapsible": true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue