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

Chore: Validate Content plugin settings 2 #530

Merged
merged 1 commit into from
May 20, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions client/ayon_core/plugins/publish/validate_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def process(self, context, plugin):
host_tools.show_scene_inventory()


class ValidateContainers(
class ValidateOutdatedContainers(
OptionalPyblishPluginMixin,
pyblish.api.ContextPlugin
):
Expand All @@ -49,7 +49,7 @@ def apply_settings(cls, settings):
settings
["core"]
["publish"]
["ValidateContainers"]
["ValidateOutdatedContainers"]
["plugin_state_profiles"]
)
profile = filter_profiles(
Expand Down
12 changes: 6 additions & 6 deletions server/settings/publish_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class CollectFramesFixDefModel(BaseSettingsModel):
)


class ValidateContainersProfile(BaseSettingsModel):
class ValidateOutdatedContainersProfile(BaseSettingsModel):
_layout = "expanded"
# Filtering
host_names: list[str] = SettingsField(
Expand All @@ -72,15 +72,15 @@ class ValidateContainersProfile(BaseSettingsModel):
active: bool = SettingsField(True, title="Active")


class ValidateContainersModel(BaseSettingsModel):
class ValidateOutdatedContainersModel(BaseSettingsModel):
"""Validate if Publishing intent was selected.

It is possible to disable validation for specific publishing context
with profiles.
"""

_isGroup = True
plugin_state_profiles: list[ValidateContainersProfile] = SettingsField(
plugin_state_profiles: list[ValidateOutdatedContainersProfile] = SettingsField(
default_factory=list,
title="Plugin enable state profiles",
)
Expand Down Expand Up @@ -797,8 +797,8 @@ class PublishPuginsModel(BaseSettingsModel):
default_factory=ValidateBaseModel,
title="Validate Version"
)
ValidateContainers: ValidateContainersModel = SettingsField(
default_factory=ValidateContainersModel,
ValidateOutdatedContainers: ValidateOutdatedContainersModel = SettingsField(
default_factory=ValidateOutdatedContainersModel,
title="Validate Containers"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if the label should be updated.

Suggested change
title="Validate Containers"
title="Validate Outdated Containers"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha - of all the changes I actually mentioned in the other PR I really meant the title to be updated since that's what the user will see in the settings directly.

Sorry, but the PR is already merged. But can we change the settings title to Validate Outdated Containers?

        title="Validate Outdated Containers"

)
ValidateIntent: ValidateIntentModel = SettingsField(
Expand Down Expand Up @@ -886,7 +886,7 @@ class PublishPuginsModel(BaseSettingsModel):
"optional": False,
"active": True
},
"ValidateContainers": {
"ValidateOutdatedContainers": {
"plugin_state_profiles": [
{
# Default host names are based on original
Expand Down
Loading