mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 13:24:54 +01:00
changed pype to openpype in setting ui and some functions
This commit is contained in:
parent
7ff248f6c9
commit
c2e916dcc5
7 changed files with 24 additions and 24 deletions
|
|
@ -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",
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
"""
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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?"
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue