From 5bc1da359d6c0836c669cd7031826eb3e513c537 Mon Sep 17 00:00:00 2001 From: "clement.hector" Date: Fri, 2 Jul 2021 16:27:28 +0200 Subject: [PATCH] rename shotgun to shotgrid --- .../modules/{shotgun => shotgrid}/README.md | 0 openpype/modules/shotgrid/__init__.py | 3 +++ .../hooks/post_shotgrid_changes.py} | 2 +- .../publish/collect_more_information.py | 0 .../shotgrid_module.py} | 22 +++++++++---------- .../tray/credential_dialog.py | 8 +++---- .../tray/shotgrid_tray.py} | 8 +++---- openpype/modules/shotgun/__init__.py | 3 --- 8 files changed, 23 insertions(+), 23 deletions(-) rename openpype/modules/{shotgun => shotgrid}/README.md (100%) create mode 100644 openpype/modules/shotgrid/__init__.py rename openpype/modules/{shotgun/hooks/post_shotgun_changes.py => shotgrid/hooks/post_shotgrid_changes.py} (77%) rename openpype/modules/{shotgun => shotgrid}/plugins/publish/collect_more_information.py (100%) rename openpype/modules/{shotgun/shotgun_module.py => shotgrid/shotgrid_module.py} (57%) rename openpype/modules/{shotgun => shotgrid}/tray/credential_dialog.py (91%) rename openpype/modules/{shotgun/tray/shotgun_tray.py => shotgrid/tray/shotgrid_tray.py} (83%) delete mode 100644 openpype/modules/shotgun/__init__.py diff --git a/openpype/modules/shotgun/README.md b/openpype/modules/shotgrid/README.md similarity index 100% rename from openpype/modules/shotgun/README.md rename to openpype/modules/shotgrid/README.md diff --git a/openpype/modules/shotgrid/__init__.py b/openpype/modules/shotgrid/__init__.py new file mode 100644 index 00000000000..74814dae627 --- /dev/null +++ b/openpype/modules/shotgrid/__init__.py @@ -0,0 +1,3 @@ +from openpype.modules.shotgrid.shotgrid_module import ShotgridModule + +__all__ = ("ShotgridModule",) diff --git a/openpype/modules/shotgun/hooks/post_shotgun_changes.py b/openpype/modules/shotgrid/hooks/post_shotgrid_changes.py similarity index 77% rename from openpype/modules/shotgun/hooks/post_shotgun_changes.py rename to openpype/modules/shotgrid/hooks/post_shotgrid_changes.py index fa8eccd2e64..e8369ad3cbc 100644 --- a/openpype/modules/shotgun/hooks/post_shotgun_changes.py +++ b/openpype/modules/shotgrid/hooks/post_shotgrid_changes.py @@ -1,7 +1,7 @@ from openpype.lib import PostLaunchHook -class PostShotgunHook(PostLaunchHook): +class PostShotgridHook(PostLaunchHook): order = None def execute(self, *args, **kwargs): diff --git a/openpype/modules/shotgun/plugins/publish/collect_more_information.py b/openpype/modules/shotgrid/plugins/publish/collect_more_information.py similarity index 100% rename from openpype/modules/shotgun/plugins/publish/collect_more_information.py rename to openpype/modules/shotgrid/plugins/publish/collect_more_information.py diff --git a/openpype/modules/shotgun/shotgun_module.py b/openpype/modules/shotgrid/shotgrid_module.py similarity index 57% rename from openpype/modules/shotgun/shotgun_module.py rename to openpype/modules/shotgrid/shotgrid_module.py index 200928fb206..746f3be8fa9 100644 --- a/openpype/modules/shotgun/shotgun_module.py +++ b/openpype/modules/shotgrid/shotgrid_module.py @@ -2,21 +2,21 @@ from typing import Optional, Dict, AnyStr, Any from openpype.modules import PypeModule, ITrayModule, IPluginPaths, ILaunchHookPaths -from openpype.modules.shotgun.tray.shotgun_tray import ShotgunTrayWrapper +from openpype.modules.shotgrid.tray.shotgrid_tray import ShotgridTrayWrapper -SHOTGUN_MODULE_DIR = os.path.dirname(os.path.abspath(__file__)) +SHOTGRID_MODULE_DIR = os.path.dirname(os.path.abspath(__file__)) -class ShotgunModule(PypeModule, ITrayModule, IPluginPaths, ILaunchHookPaths): - name: str = "shotgun" +class ShotgridModule(PypeModule, ITrayModule, IPluginPaths, ILaunchHookPaths): + name: str = "shotgrid" enabled: bool = False project_id: Optional[str] = None - tray_wrapper: ShotgunTrayWrapper + tray_wrapper: ShotgridTrayWrapper def initialize(self, modules_settings: Dict[AnyStr, Any]): - shotgun_settings = modules_settings.get(self.name, dict()) - self.enabled = shotgun_settings.get("enabled", False) - self.project_id = shotgun_settings.get("project_id") + shotgrid_settings = modules_settings.get(self.name, dict()) + self.enabled = shotgrid_settings.get("enabled", False) + self.project_id = shotgrid_settings.get("project_id") # if self.enabled and not self.project_id: # raise Exception("Project id is not set in settings.") @@ -28,13 +28,13 @@ def get_global_environments(self) -> Dict[AnyStr, Any]: return {"PROJECT_ID": self.project_id} def get_plugin_paths(self) -> Dict[AnyStr, Any]: - return {"publish": [os.path.join(SHOTGUN_MODULE_DIR, "plugins", "publish")]} + return {"publish": [os.path.join(SHOTGRID_MODULE_DIR, "plugins", "publish")]} def get_launch_hook_paths(self) -> AnyStr: - return os.path.join(SHOTGUN_MODULE_DIR, "hooks") + return os.path.join(SHOTGRID_MODULE_DIR, "hooks") def tray_init(self): - self.tray_wrapper = ShotgunTrayWrapper(self) + self.tray_wrapper = ShotgridTrayWrapper(self) def tray_start(self): return self.tray_wrapper.validate() diff --git a/openpype/modules/shotgun/tray/credential_dialog.py b/openpype/modules/shotgrid/tray/credential_dialog.py similarity index 91% rename from openpype/modules/shotgun/tray/credential_dialog.py rename to openpype/modules/shotgrid/tray/credential_dialog.py index 426d4a847ff..a4a79177567 100644 --- a/openpype/modules/shotgun/tray/credential_dialog.py +++ b/openpype/modules/shotgrid/tray/credential_dialog.py @@ -28,7 +28,7 @@ def __init__(self, module, parent=None): self._module = module self._is_logged = False - self.setWindowTitle("OpenPype - Shotgun Login") + self.setWindowTitle("OpenPype - Shotgrid Login") self.setWindowFlags( QtCore.Qt.WindowCloseButtonHint | QtCore.Qt.WindowMinimizeButtonHint @@ -40,7 +40,7 @@ def __init__(self, module, parent=None): self.ui_init() def ui_init(self): - self.url_label = QtWidgets.QLabel("Shotgun URL:") + self.url_label = QtWidgets.QLabel("Shotgrid URL:") self.login_label = QtWidgets.QLabel("Login:") self.password_label = QtWidgets.QLabel("Password:") # self.url_input = QtWidgets.QLabel() @@ -50,7 +50,7 @@ def ui_init(self): # self.url_input.setCursor(QtGui.QCursor(QtCore.Qt.IBeamCursor)) self.url_input = QtWidgets.QLineEdit() - self.url_input.setPlaceholderText("shotgun url") + self.url_input.setPlaceholderText("shotgrid url") self.login_input = QtWidgets.QLineEdit() self.login_input.setPlaceholderText("login") @@ -66,7 +66,7 @@ def ui_init(self): self.input_layout.addRow(self.password_label, self.password_input) self.login_button = QtWidgets.QPushButton("Login") - self.login_button.setToolTip("Login into shotgun instance") + self.login_button.setToolTip("Login into shotgrid instance") self.buttons_layout = QtWidgets.QHBoxLayout() self.buttons_layout.addWidget(self.login_button) diff --git a/openpype/modules/shotgun/tray/shotgun_tray.py b/openpype/modules/shotgrid/tray/shotgrid_tray.py similarity index 83% rename from openpype/modules/shotgun/tray/shotgun_tray.py rename to openpype/modules/shotgrid/tray/shotgrid_tray.py index f7ab705d809..a6d85e73e21 100644 --- a/openpype/modules/shotgun/tray/shotgun_tray.py +++ b/openpype/modules/shotgrid/tray/shotgrid_tray.py @@ -1,10 +1,10 @@ from typing import Any -from openpype.modules.shotgun.tray.credential_dialog import CredentialsDialog +from openpype.modules.shotgrid.tray.credential_dialog import CredentialsDialog from Qt import QtWidgets -class ShotgunTrayWrapper: +class ShotgridTrayWrapper: module: Any credentials_dialog: CredentialsDialog @@ -22,8 +22,8 @@ def show_credential_dialog(self): def tray_menu(self, tray_menu): print(type(tray_menu)) - menu = QtWidgets.QMenu("Shotgun", tray_menu) - show_connect_action = QtWidgets.QAction("Connect to Shotgun", menu) + menu = QtWidgets.QMenu("Shotgrid", tray_menu) + show_connect_action = QtWidgets.QAction("Connect to Shotgrid", menu) show_connect_action.triggered.connect(self.show_connect_dialog) menu.addAction(show_connect_action) diff --git a/openpype/modules/shotgun/__init__.py b/openpype/modules/shotgun/__init__.py deleted file mode 100644 index edc0c6d23f5..00000000000 --- a/openpype/modules/shotgun/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -from openpype.modules.shotgun.shotgun_module import ShotgunModule - -__all__ = ("ShotgunModule",)