mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
validate if deadline addon settings are available
This commit is contained in:
parent
8727cf305b
commit
1c9fbb145b
2 changed files with 19 additions and 2 deletions
|
|
@ -13,7 +13,15 @@ class CollectFileDependencies(plugin.MayaContextPlugin):
|
|||
@classmethod
|
||||
def apply_settings(cls, project_settings):
|
||||
# Disable plug-in if not used for deadline submission anyway
|
||||
settings = project_settings["deadline"]["publish"]["MayaSubmitDeadline"] # noqa
|
||||
if "deadline" not in project_settings:
|
||||
cls.enabled = False
|
||||
return
|
||||
settings = (
|
||||
project_settings
|
||||
["deadline"]
|
||||
["publish"]
|
||||
["MayaSubmitDeadline"]
|
||||
)
|
||||
cls.enabled = settings.get("asset_dependencies", True)
|
||||
|
||||
def process(self, context):
|
||||
|
|
|
|||
|
|
@ -28,7 +28,16 @@ class ExtractImportReference(plugin.MayaExtractorPlugin,
|
|||
|
||||
@classmethod
|
||||
def apply_settings(cls, project_settings):
|
||||
cls.active = project_settings["deadline"]["publish"]["MayaSubmitDeadline"]["import_reference"] # noqa
|
||||
if "deadline" not in project_settings:
|
||||
cls.enabled = False
|
||||
return
|
||||
cls.active = (
|
||||
project_settings
|
||||
["deadline"]
|
||||
["publish"]
|
||||
["MayaSubmitDeadline"]
|
||||
["import_reference"]
|
||||
)
|
||||
|
||||
def process(self, instance):
|
||||
if not self.is_active(instance.data):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue