AYON: Use AYON label in ayon mode (#5995)

* use AYON instead of OpenPype in tool titles

* add bundle name to info data

* modified message to report ynput team

* fix experimental tool titles
This commit is contained in:
Jakub Trllo 2023-12-05 15:50:19 +01:00 committed by GitHub
parent 61c97ef7a2
commit 5d9dd3ae9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 9 deletions

View file

@ -8,6 +8,7 @@ import appdirs
from qtpy import QtCore, QtWidgets, QtGui
from openpype import resources
from openpype import AYON_SERVER_ENABLED
from openpype.style import load_stylesheet
from openpype.lib import JSONSettingRegistry
@ -339,7 +340,9 @@ class PythonInterpreterWidget(QtWidgets.QWidget):
def __init__(self, parent=None):
super(PythonInterpreterWidget, self).__init__(parent)
self.setWindowTitle("OpenPype Console")
self.setWindowTitle("{} Console".format(
"AYON" if AYON_SERVER_ENABLED else "OpenPype"
))
self.setWindowIcon(QtGui.QIcon(resources.get_openpype_icon_filepath()))
self.ansi_escape = re.compile(

View file

@ -1,5 +1,6 @@
from qtpy import QtWidgets, QtCore, QtGui
from openpype import AYON_SERVER_ENABLED
from openpype.style import (
load_stylesheet,
app_icon_path
@ -26,7 +27,8 @@ class ExperimentalToolsDialog(QtWidgets.QDialog):
def __init__(self, parent=None):
super(ExperimentalToolsDialog, self).__init__(parent)
self.setWindowTitle("OpenPype Experimental tools")
app_label = "AYON" if AYON_SERVER_ENABLED else "OpenPype"
self.setWindowTitle("{} Experimental tools".format(app_label))
icon = QtGui.QIcon(app_icon_path())
self.setWindowIcon(icon)
self.setStyleSheet(load_stylesheet())
@ -68,8 +70,8 @@ class ExperimentalToolsDialog(QtWidgets.QDialog):
tool_btns_label = QtWidgets.QLabel(
(
"You can enable these features in"
"<br><b>OpenPype tray -> Settings -> Experimental tools</b>"
),
"<br><b>{} tray -> Settings -> Experimental tools</b>"
).format(app_label),
tool_btns_widget
)
tool_btns_label.setAlignment(QtCore.Qt.AlignCenter)
@ -113,6 +115,7 @@ class ExperimentalToolsDialog(QtWidgets.QDialog):
self._window_is_active = False
def refresh(self):
app_label = "AYON" if AYON_SERVER_ENABLED else "OpenPype"
self._experimental_tools.refresh_availability()
buttons_to_remove = set(self._buttons_by_tool_identifier.keys())
@ -139,8 +142,8 @@ class ExperimentalToolsDialog(QtWidgets.QDialog):
elif is_new or button.isEnabled():
button.setToolTip((
"You can enable this tool in local settings."
"\n\nOpenPype Tray > Settings > Experimental Tools"
))
"\n\n{} Tray > Settings > Experimental Tools"
).format(app_label))
if tool.enabled != button.isEnabled():
button.setEnabled(tool.enabled)

View file

@ -2517,7 +2517,7 @@ class PublisherController(BasePublisherController):
else:
msg = (
"Something went wrong. Send report"
" to your supervisor or OpenPype."
" to your supervisor or Ynput team."
)
self.publish_error_msg = msg
self.publish_has_crashed = True

View file

@ -9,6 +9,7 @@ from openpype import (
resources,
style
)
from openpype import AYON_SERVER_ENABLED
from openpype.tools.utils import (
ErrorMessageBox,
PlaceholderLineEdit,
@ -53,7 +54,9 @@ class PublisherWindow(QtWidgets.QDialog):
self.setObjectName("PublishWindow")
self.setWindowTitle("OpenPype publisher")
self.setWindowTitle("{} publisher".format(
"AYON" if AYON_SERVER_ENABLED else "OpenPype"
))
icon = QtGui.QIcon(resources.get_openpype_icon_filepath())
self.setWindowIcon(icon)

View file

@ -219,7 +219,9 @@ class PypeInfoWidget(QtWidgets.QWidget):
icon = QtGui.QIcon(resources.get_openpype_icon_filepath())
self.setWindowIcon(icon)
self.setWindowTitle("OpenPype info")
self.setWindowTitle(
"{} info".format("AYON" if AYON_SERVER_ENABLED else "OpenPype")
)
scroll_area = QtWidgets.QScrollArea(self)
info_widget = PypeInfoSubWidget(scroll_area)
@ -441,16 +443,19 @@ class PypeInfoSubWidget(QtWidgets.QWidget):
info_values = {
"executable": executable_args[-1],
"server_url": os.environ["AYON_SERVER_URL"],
"bundle_name": os.environ["AYON_BUNDLE_NAME"],
"username": username
}
key_label_mapping = {
"executable": "AYON Executable:",
"server_url": "AYON Server:",
"bundle_name": "AYON Bundle:",
"username": "AYON Username:"
}
# Prepare keys order
keys_order = [
"server_url",
"bundle_name",
"username",
"executable",
]