mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
move settings to tools
This commit is contained in:
parent
5404153b94
commit
f4bd5d49f9
2 changed files with 29 additions and 30 deletions
|
|
@ -34,27 +34,6 @@ class ValidateBaseModel(BaseSettingsModel):
|
|||
active: bool = SettingsField(True, title="Active")
|
||||
|
||||
|
||||
class DiscoverValidationModel(BaseSettingsModel):
|
||||
"""Strictly validate publish plugins discovery.
|
||||
|
||||
Artist won't be able to publish if path to publish plugin fails to be
|
||||
imported.
|
||||
|
||||
"""
|
||||
_isGroup = True
|
||||
enabled: bool = SettingsField(
|
||||
False,
|
||||
description="Enable strict mode of plugins discovery",
|
||||
)
|
||||
ignore_paths: list[str] = SettingsField(
|
||||
default_factory=list,
|
||||
title="Ignored paths (regex)",
|
||||
description=(
|
||||
"Paths that do match regex will be skipped in validation."
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
class CollectAnatomyInstanceDataModel(BaseSettingsModel):
|
||||
_isGroup = True
|
||||
follow_workfile_version: bool = SettingsField(
|
||||
|
|
@ -1236,11 +1215,6 @@ class CleanUpFarmModel(BaseSettingsModel):
|
|||
|
||||
|
||||
class PublishPuginsModel(BaseSettingsModel):
|
||||
discover_validation: DiscoverValidationModel = SettingsField(
|
||||
default_factory=DiscoverValidationModel,
|
||||
title="Validate plugins discovery",
|
||||
)
|
||||
|
||||
CollectAnatomyInstanceData: CollectAnatomyInstanceDataModel = (
|
||||
SettingsField(
|
||||
default_factory=CollectAnatomyInstanceDataModel,
|
||||
|
|
@ -1371,10 +1345,6 @@ class PublishPuginsModel(BaseSettingsModel):
|
|||
|
||||
|
||||
DEFAULT_PUBLISH_VALUES = {
|
||||
"discover_validation": {
|
||||
"enabled": False,
|
||||
"ignore_paths": [],
|
||||
},
|
||||
"CollectAnatomyInstanceData": {
|
||||
"follow_workfile_version": False
|
||||
},
|
||||
|
|
|
|||
|
|
@ -352,6 +352,27 @@ class CustomStagingDirProfileModel(BaseSettingsModel):
|
|||
)
|
||||
|
||||
|
||||
class DiscoverValidationModel(BaseSettingsModel):
|
||||
"""Strictly validate publish plugins discovery.
|
||||
|
||||
Artist won't be able to publish if path to publish plugin fails to be
|
||||
imported.
|
||||
|
||||
"""
|
||||
_isGroup = True
|
||||
enabled: bool = SettingsField(
|
||||
False,
|
||||
description="Enable strict mode of plugins discovery",
|
||||
)
|
||||
ignore_paths: list[str] = SettingsField(
|
||||
default_factory=list,
|
||||
title="Ignored paths (regex)",
|
||||
description=(
|
||||
"Paths that do match regex will be skipped in validation."
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
class PublishToolModel(BaseSettingsModel):
|
||||
template_name_profiles: list[PublishTemplateNameProfile] = SettingsField(
|
||||
default_factory=list,
|
||||
|
|
@ -369,6 +390,10 @@ class PublishToolModel(BaseSettingsModel):
|
|||
title="Custom Staging Dir Profiles"
|
||||
)
|
||||
)
|
||||
discover_validation: DiscoverValidationModel = SettingsField(
|
||||
default_factory=DiscoverValidationModel,
|
||||
title="Validate plugins discovery",
|
||||
)
|
||||
comment_minimum_required_chars: int = SettingsField(
|
||||
0,
|
||||
title="Publish comment minimum required characters",
|
||||
|
|
@ -691,6 +716,10 @@ DEFAULT_TOOLS_VALUES = {
|
|||
"template_name": "simpleUnrealTextureHero"
|
||||
}
|
||||
],
|
||||
"discover_validation": {
|
||||
"enabled": False,
|
||||
"ignore_paths": [],
|
||||
},
|
||||
"comment_minimum_required_chars": 0,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue