From c2e916dcc57249896fea49be135ca58db02dc8ee Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 1 Apr 2021 16:33:51 +0200 Subject: [PATCH] changed pype to openpype in setting ui and some functions --- pype/lib/__init__.py | 4 ++-- pype/lib/local_settings.py | 4 ++-- pype/settings/entities/__init__.py | 6 ++--- .../settings/local_settings/mongo_widget.py | 22 +++++++++---------- pype/tools/settings/local_settings/window.py | 4 ++-- pype/tools/settings/settings/README.md | 6 ++--- .../tools/settings/settings/widgets/window.py | 2 +- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pype/lib/__init__.py b/pype/lib/__init__.py index f4282f7ea3..bf3610da95 100644 --- a/pype/lib/__init__.py +++ b/pype/lib/__init__.py @@ -106,7 +106,7 @@ from .local_settings import ( JSONSettingRegistry, PypeSettingsRegistry, get_local_site_id, - change_pype_mongo_url + change_openpype_mongo_url ) from .path_tools import ( @@ -219,7 +219,7 @@ __all__ = [ "JSONSettingRegistry", "PypeSettingsRegistry", "get_local_site_id", - "change_pype_mongo_url", + "change_openpype_mongo_url", "timeit", diff --git a/pype/lib/local_settings.py b/pype/lib/local_settings.py index aa372a52d2..03883c0a94 100644 --- a/pype/lib/local_settings.py +++ b/pype/lib/local_settings.py @@ -496,10 +496,10 @@ def get_local_site_id(): return _create_local_site_id() -def change_pype_mongo_url(new_mongo_url): +def change_openpype_mongo_url(new_mongo_url): """Change mongo url in pype registry. - Change of Pype mongo URL require restart of running pype processes or + Change of OpenPype mongo URL require restart of running pype processes or processes using pype. """ diff --git a/pype/settings/entities/__init__.py b/pype/settings/entities/__init__.py index d4a7fea304..f76a915225 100644 --- a/pype/settings/entities/__init__.py +++ b/pype/settings/entities/__init__.py @@ -1,9 +1,9 @@ -"""Pype Settings +"""OpenPype Settings Settings define how openpype and it's modules behave. They became main component of dynamism. -Pype settings (ATM) have 3 layers: +OpenPype settings (ATM) have 3 layers: 1.) Defaults - defined in code 2.) Studio overrides - values that are applied on default that may modify only some values or None, result can be called "studio settings" @@ -24,7 +24,7 @@ visuallise how values are applied. With help of setting entities it is possible to modify settings from code. -Pype has (ATM) 2 types of settings: +OpenPype has (ATM) 2 types of settings: 1.) System settings - global system settings, don't have project overrides 2.) Project settings - project specific settings diff --git a/pype/tools/settings/local_settings/mongo_widget.py b/pype/tools/settings/local_settings/mongo_widget.py index c6f6ab1591..1e60b43cc6 100644 --- a/pype/tools/settings/local_settings/mongo_widget.py +++ b/pype/tools/settings/local_settings/mongo_widget.py @@ -5,16 +5,16 @@ import traceback from Qt import QtWidgets from pymongo.errors import ServerSelectionTimeoutError -from pype.api import change_pype_mongo_url +from pype.api import change_openpype_mongo_url -class PypeMongoWidget(QtWidgets.QWidget): +class OpenPypeMongoWidget(QtWidgets.QWidget): def __init__(self, parent): - super(PypeMongoWidget, self).__init__(parent) + super(OpenPypeMongoWidget, self).__init__(parent) # Warning label warning_label = QtWidgets.QLabel(( - "WARNING: Requires restart. Change of Pype Mongo requires to" + "WARNING: Requires restart. Change of OpenPype Mongo requires to" " restart of all running Pype processes and process using Pype" " (Including this)." "\n- all changes in different categories won't be saved." @@ -22,11 +22,11 @@ class PypeMongoWidget(QtWidgets.QWidget): warning_label.setStyleSheet("font-weight: bold;") # Label - mongo_url_label = QtWidgets.QLabel("Pype Mongo URL", self) + mongo_url_label = QtWidgets.QLabel("OpenPype Mongo URL", self) # Input mongo_url_input = QtWidgets.QLineEdit(self) - mongo_url_input.setPlaceholderText("< Pype Mongo URL >") + mongo_url_input.setPlaceholderText("< OpenPype Mongo URL >") mongo_url_input.setText(os.environ["PYPE_MONGO"]) # Confirm button @@ -48,14 +48,14 @@ class PypeMongoWidget(QtWidgets.QWidget): dialog = QtWidgets.QMessageBox(self) - title = "Pype mongo changed" + title = "OpenPype mongo changed" message = ( - "Pype mongo url was successfully changed. Restart Pype please." + "OpenPype mongo url was successfully changed. Restart Pype please." ) details = None try: - change_pype_mongo_url(value) + change_openpype_mongo_url(value) except Exception as exc: if isinstance(exc, ServerSelectionTimeoutError): error_message = ( @@ -65,10 +65,10 @@ class PypeMongoWidget(QtWidgets.QWidget): else: error_message = str(exc) - title = "Pype mongo change failed" + title = "OpenPype mongo change failed" # TODO catch exception message more gracefully message = ( - "Pype mongo change was not successful." + "OpenPype mongo change was not successful." " Full traceback can be found in details section.\n\n" "Error message:\n{}" ).format(error_message) diff --git a/pype/tools/settings/local_settings/window.py b/pype/tools/settings/local_settings/window.py index c5f5d15831..b2c32d135e 100644 --- a/pype/tools/settings/local_settings/window.py +++ b/pype/tools/settings/local_settings/window.py @@ -17,7 +17,7 @@ from .widgets import ( SpacerWidget, ExpandingWidget ) -from .mongo_widget import PypeMongoWidget +from .mongo_widget import OpenPypeMongoWidget from .general_widget import LocalGeneralWidgets from .apps_widget import LocalApplicationsWidgets from .projects_widget import ProjectSettingsWidget @@ -62,7 +62,7 @@ class LocalSettingsWidget(QtWidgets.QWidget): pype_mongo_layout.setContentsMargins(CHILD_OFFSET, 5, 0, 0) pype_mongo_expand_widget.set_content_widget(pype_mongo_content) - pype_mongo_widget = PypeMongoWidget(self) + pype_mongo_widget = OpenPypeMongoWidget(self) pype_mongo_layout.addWidget(pype_mongo_widget) self.main_layout.addWidget(pype_mongo_expand_widget) diff --git a/pype/tools/settings/settings/README.md b/pype/tools/settings/settings/README.md index 65d73a0728..31d8fc5b74 100644 --- a/pype/tools/settings/settings/README.md +++ b/pype/tools/settings/settings/README.md @@ -7,9 +7,9 @@ - each input may have "input modifiers" (keys in dictionary) that are required or optional - only required modifier for all input items is key `"type"` which says what type of item it is - there are special keys across all inputs - - `"is_file"` - this key is for storing pype defaults in `pype` repo + - `"is_file"` - this key is for storing openpype defaults in `openpype` repo - reasons of existence: developing new schemas does not require to create defaults manually - - key is validated, must be once in hierarchy else it won't be possible to store pype defaults + - key is validated, must be once in hierarchy else it won't be possible to store openpype defaults - `"is_group"` - define that all values under key in hierarchy will be overriden if any value is modified, this information is also stored to overrides - this keys is not allowed for all inputs as they may have not reason for that - key is validated, can be only once in hierarchy but is not required @@ -191,7 +191,7 @@ { "type": "boolean", "key": "my_boolean_key", - "label": "Do you want to use Pype?" + "label": "Do you want to use OpenPype?" } ``` diff --git a/pype/tools/settings/settings/widgets/window.py b/pype/tools/settings/settings/widgets/window.py index 058611c36a..96275facff 100644 --- a/pype/tools/settings/settings/widgets/window.py +++ b/pype/tools/settings/settings/widgets/window.py @@ -15,7 +15,7 @@ class MainWidget(QtWidgets.QWidget): def __init__(self, user_role, parent=None): super(MainWidget, self).__init__(parent) self.setObjectName("MainWidget") - self.setWindowTitle("Pype Settings") + self.setWindowTitle("OpenPype Settings") self.resize(self.widget_width, self.widget_height)