Merge branch 'develop' into feature/OP-7176_Use-folder-path-as-unique-identifier

This commit is contained in:
Jakub Trllo 2023-11-02 11:40:01 +01:00
commit ff8cd30244
41 changed files with 1234 additions and 165 deletions

View file

@ -237,8 +237,13 @@ class UISeparatorDef(UIDef):
class UILabelDef(UIDef):
type = "label"
def __init__(self, label):
super(UILabelDef, self).__init__(label=label)
def __init__(self, label, key=None):
super(UILabelDef, self).__init__(label=label, key=key)
def __eq__(self, other):
if not super(UILabelDef, self).__eq__(other):
return False
return self.label == other.label
# ---------------------------------------

View file

@ -611,6 +611,12 @@ def get_openpype_username():
settings and last option is to use `getpass.getuser()` which returns
machine username.
"""
if AYON_SERVER_ENABLED:
import ayon_api
return ayon_api.get_user()["name"]
username = os.environ.get("OPENPYPE_USERNAME")
if not username:
local_settings = get_local_settings()