Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove settings for deprecated validator ValidateModelName #140

Merged
merged 4 commits into from
Oct 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 1 addition & 47 deletions server/settings/publishers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from ayon_server.settings import (
BaseSettingsModel,
SettingsField,
MultiplatformPathModel,
ensure_unique_names,
)
from ayon_server.exceptions import BadRequestException
Expand Down Expand Up @@ -101,36 +100,6 @@ class ValidateRigOutSetNodeIdsModel(BaseSettingsModel):
allow_history_only: bool = SettingsField(title="Allow history only")


class ValidateModelNameModel(BaseSettingsModel):
enabled: bool = SettingsField(title="Enabled")
database: bool = SettingsField(
title="Use database shader name definitions"
)
material_file: MultiplatformPathModel = SettingsField(
default_factory=MultiplatformPathModel,
title="Material File",
description=(
"Path to material file defining list of material names to check."
)
)
regex: str = SettingsField(
"(.*)_(\\d)*_(?P<shader>.*)_(GEO)",
title="Validation regex",
description=(
"Regex for validating name of top level group name. You can use"
" named capturing groups:(?P<asset>.*) for Asset name"
)
)
top_level_regex: str = SettingsField(
".*_GRP",
title="Top level group name regex",
description=(
"To check for asset in name so *_some_asset_name_GRP"
" is valid, use:.*?_(?P<asset>.*)_GEO"
)
)


class ValidateModelContentModel(BaseSettingsModel):
enabled: bool = SettingsField(title="Enabled")
optional: bool = SettingsField(title="Optional")
Expand Down Expand Up @@ -787,14 +756,10 @@ class PublishersModel(BaseSettingsModel):
title="Yeti Rig Settings"
)
# Model - START
ValidateModelName: ValidateModelNameModel = SettingsField(
default_factory=ValidateModelNameModel,
title="Validate Model Name",
section="Model",
)
ValidateModelContent: ValidateModelContentModel = SettingsField(
default_factory=ValidateModelContentModel,
title="Validate Model Content",
BigRoy marked this conversation as resolved.
Show resolved Hide resolved
section="Model"
)
ValidateTransformNamingSuffix: ValidateTransformNamingSuffixModel = (
SettingsField(
Expand Down Expand Up @@ -1329,17 +1294,6 @@ class PublishersModel(BaseSettingsModel):
"optional": False,
"active": True
},
"ValidateModelName": {
"enabled": False,
"database": True,
"material_file": {
"windows": "",
"darwin": "",
"linux": ""
},
"regex": "(.*)_(\\d)*_(?P<shader>.*)_(GEO)",
"top_level_regex": ".*_GRP"
},
"ValidateModelContent": {
"enabled": True,
"optional": False,
Expand Down