diff --git a/.gitmodules b/.gitmodules index 67ff34a3537..38b261a86ab 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,6 +10,6 @@ [submodule "openpype/modules/default_modules/ftrack/python2_vendor/ftrack-python-api"] path = openpype/modules/default_modules/ftrack/python2_vendor/ftrack-python-api url = https://bitbucket.org/ftrack/ftrack-python-api.git -[submodule "openpype/modules/shotgrid/leech_server"] - path = openpype/modules/shotgrid/leech_server +[submodule "openpype/modules/default_modules/shotgrid/leech_server"] + path = openpype/modules/default_modules/shotgrid/leech_server url = https://github.com/Ellipsanime/shotgrid-leecher.git diff --git a/openpype/modules/shotgrid/README.md b/openpype/modules/default_modules/shotgrid/README.md similarity index 95% rename from openpype/modules/shotgrid/README.md rename to openpype/modules/default_modules/shotgrid/README.md index 17b713c06e7..ae95f644932 100644 --- a/openpype/modules/shotgrid/README.md +++ b/openpype/modules/default_modules/shotgrid/README.md @@ -2,7 +2,7 @@ ### First steps -At the beginning you have to create a working environment, you can achieve it with bootstrap scripts from `tools` folder. Just follow the tutorial from the main `README.md` [file](../../../README.md). +At the beginning you have to create a working environment, you can achieve it with bootstrap scripts from `tools` folder. Just follow the tutorial from the main `README.md` [file](../../../../README.md). ### Hooks diff --git a/openpype/modules/default_modules/shotgrid/__init__.py b/openpype/modules/default_modules/shotgrid/__init__.py new file mode 100644 index 00000000000..158bdb6614f --- /dev/null +++ b/openpype/modules/default_modules/shotgrid/__init__.py @@ -0,0 +1,5 @@ +from openpype.modules.default_modules.shotgrid.shotgrid_module import ( + ShotgridModule, +) + +__all__ = ("ShotgridModule",) diff --git a/openpype/modules/shotgrid/hooks/post_shotgrid_changes.py b/openpype/modules/default_modules/shotgrid/hooks/post_shotgrid_changes.py similarity index 100% rename from openpype/modules/shotgrid/hooks/post_shotgrid_changes.py rename to openpype/modules/default_modules/shotgrid/hooks/post_shotgrid_changes.py diff --git a/openpype/modules/shotgrid/lib/const.py b/openpype/modules/default_modules/shotgrid/lib/const.py similarity index 100% rename from openpype/modules/shotgrid/lib/const.py rename to openpype/modules/default_modules/shotgrid/lib/const.py diff --git a/openpype/modules/shotgrid/lib/credentials.py b/openpype/modules/default_modules/shotgrid/lib/credentials.py similarity index 100% rename from openpype/modules/shotgrid/lib/credentials.py rename to openpype/modules/default_modules/shotgrid/lib/credentials.py diff --git a/openpype/modules/shotgrid/lib/record.py b/openpype/modules/default_modules/shotgrid/lib/record.py similarity index 100% rename from openpype/modules/shotgrid/lib/record.py rename to openpype/modules/default_modules/shotgrid/lib/record.py diff --git a/openpype/modules/shotgrid/lib/settings.py b/openpype/modules/default_modules/shotgrid/lib/settings.py similarity index 100% rename from openpype/modules/shotgrid/lib/settings.py rename to openpype/modules/default_modules/shotgrid/lib/settings.py diff --git a/openpype/modules/shotgrid/plugins/publish/collect_more_information.py b/openpype/modules/default_modules/shotgrid/plugins/publish/collect_more_information.py similarity index 100% rename from openpype/modules/shotgrid/plugins/publish/collect_more_information.py rename to openpype/modules/default_modules/shotgrid/plugins/publish/collect_more_information.py diff --git a/openpype/modules/shotgrid/shotgrid_module.py b/openpype/modules/default_modules/shotgrid/shotgrid_module.py similarity index 84% rename from openpype/modules/shotgrid/shotgrid_module.py rename to openpype/modules/default_modules/shotgrid/shotgrid_module.py index 183ce55f3c1..18066e7d274 100644 --- a/openpype/modules/shotgrid/shotgrid_module.py +++ b/openpype/modules/default_modules/shotgrid/shotgrid_module.py @@ -1,21 +1,25 @@ import os from typing import Optional, Dict, Any -from openpype.modules.shotgrid.lib import credentials -from openpype.modules.shotgrid.lib import settings +from openpype.modules.default_modules.shotgrid.lib import settings, credentials import shotgun_api3 -from openpype.modules import ( - PypeModule, +from openpype.modules import OpenPypeModule + +from openpype_interfaces import ( ITrayModule, IPluginPaths, ILaunchHookPaths, ) -from openpype.modules.shotgrid.tray.shotgrid_tray import ShotgridTrayWrapper +from openpype.modules.default_modules.shotgrid.tray.shotgrid_tray import ( + ShotgridTrayWrapper, +) SHOTGRID_MODULE_DIR = os.path.dirname(os.path.abspath(__file__)) -class ShotgridModule(PypeModule, ITrayModule, IPluginPaths, ILaunchHookPaths): +class ShotgridModule( + OpenPypeModule, ITrayModule, IPluginPaths, ILaunchHookPaths +): name: str = "shotgrid" enabled: bool = False project_id: Optional[str] = None diff --git a/openpype/modules/shotgrid/tests/shotgrid/lib/test_credentials.py b/openpype/modules/default_modules/shotgrid/tests/shotgrid/lib/test_credentials.py similarity index 91% rename from openpype/modules/shotgrid/tests/shotgrid/lib/test_credentials.py rename to openpype/modules/default_modules/shotgrid/tests/shotgrid/lib/test_credentials.py index 1f78cf77c92..52aef541704 100644 --- a/openpype/modules/shotgrid/tests/shotgrid/lib/test_credentials.py +++ b/openpype/modules/default_modules/shotgrid/tests/shotgrid/lib/test_credentials.py @@ -1,7 +1,7 @@ import pytest from assertpy import assert_that -import openpype.modules.shotgrid.lib.credentials as sut +import openpype.modules.default_modules.shotgrid.lib.credentials as sut def test_missing_shotgrid_url(): diff --git a/openpype/modules/shotgrid/tray/credential_dialog.py b/openpype/modules/default_modules/shotgrid/tray/credential_dialog.py similarity index 98% rename from openpype/modules/shotgrid/tray/credential_dialog.py rename to openpype/modules/default_modules/shotgrid/tray/credential_dialog.py index bb53ad4402e..2e2b69bd6e9 100644 --- a/openpype/modules/shotgrid/tray/credential_dialog.py +++ b/openpype/modules/default_modules/shotgrid/tray/credential_dialog.py @@ -3,8 +3,7 @@ from openpype import style from openpype import resources -from openpype.modules.shotgrid.lib import credentials -from openpype.modules.shotgrid.lib import settings +from openpype.modules.default_modules.shotgrid.lib import settings, credentials class CredentialsDialog(QtWidgets.QDialog): diff --git a/openpype/modules/shotgrid/tray/shotgrid_tray.py b/openpype/modules/default_modules/shotgrid/tray/shotgrid_tray.py similarity index 100% rename from openpype/modules/shotgrid/tray/shotgrid_tray.py rename to openpype/modules/default_modules/shotgrid/tray/shotgrid_tray.py diff --git a/openpype/modules/shotgrid/__init__.py b/openpype/modules/shotgrid/__init__.py deleted file mode 100644 index 74814dae627..00000000000 --- a/openpype/modules/shotgrid/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -from openpype.modules.shotgrid.shotgrid_module import ShotgridModule - -__all__ = ("ShotgridModule",)