forked from ynput/OpenPype
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
30d354d
commit b60e484
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
MODULE_NAME = "shotgrid" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import os | ||
from typing import Tuple, AnyStr, Dict, Any | ||
|
||
from openpype.api import get_system_settings | ||
from openpype.modules.shotgrid.lib.const import MODULE_NAME | ||
|
||
|
||
def get_shotgrid_settings() -> Dict[AnyStr, Any]: | ||
return get_system_settings()["modules"][MODULE_NAME] | ||
|
||
|
||
def get_shotgrid_url_from_settings() -> AnyStr: | ||
return get_shotgrid_settings()["shotgrid_url"] | ||
|
||
|
||
def get_shotgrid_event_mongo_info() -> Tuple[AnyStr, AnyStr]: | ||
database_name = os.environ["OPENPYPE_DATABASE_NAME"] | ||
collection_name = "shotgrid_events" | ||
return database_name, collection_name |