This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6173 from ynput/enhancement/use-settings-field-in…
…-ayon-settings AYON: Use `SettingsField` from ayon server
- Loading branch information
Showing
98 changed files
with
2,293 additions
and
2,163 deletions.
There are no files selected for viewing
10 changes: 4 additions & 6 deletions
10
server_addon/aftereffects/server/settings/creator_plugins.py
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 |
---|---|---|
@@ -1,18 +1,16 @@ | ||
from pydantic import Field | ||
|
||
from ayon_server.settings import BaseSettingsModel | ||
from ayon_server.settings import BaseSettingsModel, SettingsField | ||
|
||
|
||
class CreateRenderPlugin(BaseSettingsModel): | ||
mark_for_review: bool = Field(True, title="Review") | ||
default_variants: list[str] = Field( | ||
mark_for_review: bool = SettingsField(True, title="Review") | ||
default_variants: list[str] = SettingsField( | ||
default_factory=list, | ||
title="Default Variants" | ||
) | ||
|
||
|
||
class AfterEffectsCreatorPlugins(BaseSettingsModel): | ||
RenderCreator: CreateRenderPlugin = Field( | ||
RenderCreator: CreateRenderPlugin = SettingsField( | ||
title="Create Render", | ||
default_factory=CreateRenderPlugin, | ||
) |
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
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
28 changes: 13 additions & 15 deletions
28
server_addon/aftereffects/server/settings/publish_plugins.py
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
14 changes: 7 additions & 7 deletions
14
server_addon/aftereffects/server/settings/templated_workfile_build.py
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 |
---|---|---|
@@ -1,33 +1,33 @@ | ||
from pydantic import Field | ||
from ayon_server.settings import ( | ||
BaseSettingsModel, | ||
task_types_enum, | ||
SettingsField, | ||
) | ||
|
||
|
||
class TemplatedWorkfileProfileModel(BaseSettingsModel): | ||
task_types: list[str] = Field( | ||
task_types: list[str] = SettingsField( | ||
default_factory=list, | ||
title="Task types", | ||
enum_resolver=task_types_enum | ||
) | ||
task_names: list[str] = Field( | ||
task_names: list[str] = SettingsField( | ||
default_factory=list, | ||
title="Task names" | ||
) | ||
path: str = Field( | ||
path: str = SettingsField( | ||
title="Path to template" | ||
) | ||
keep_placeholder: bool = Field( | ||
keep_placeholder: bool = SettingsField( | ||
False, | ||
title="Keep placeholders") | ||
create_first_version: bool = Field( | ||
create_first_version: bool = SettingsField( | ||
True, | ||
title="Create first version" | ||
) | ||
|
||
|
||
class TemplatedWorkfileBuildModel(BaseSettingsModel): | ||
profiles: list[TemplatedWorkfileProfileModel] = Field( | ||
profiles: list[TemplatedWorkfileProfileModel] = SettingsField( | ||
default_factory=list | ||
) |
16 changes: 9 additions & 7 deletions
16
server_addon/aftereffects/server/settings/workfile_builder.py
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 |
---|---|---|
@@ -1,25 +1,27 @@ | ||
from pydantic import Field | ||
|
||
from ayon_server.settings import BaseSettingsModel, MultiplatformPathModel | ||
from ayon_server.settings import ( | ||
BaseSettingsModel, | ||
SettingsField, | ||
MultiplatformPathModel, | ||
) | ||
|
||
|
||
class CustomBuilderTemplate(BaseSettingsModel): | ||
task_types: list[str] = Field( | ||
task_types: list[str] = SettingsField( | ||
default_factory=list, | ||
title="Task types", | ||
) | ||
template_path: MultiplatformPathModel = Field( | ||
template_path: MultiplatformPathModel = SettingsField( | ||
default_factory=MultiplatformPathModel | ||
) | ||
|
||
|
||
class WorkfileBuilderPlugin(BaseSettingsModel): | ||
_title = "Workfile Builder" | ||
create_first_version: bool = Field( | ||
create_first_version: bool = SettingsField( | ||
False, | ||
title="Create first workfile" | ||
) | ||
|
||
custom_templates: list[CustomBuilderTemplate] = Field( | ||
custom_templates: list[CustomBuilderTemplate] = SettingsField( | ||
default_factory=list | ||
) |
Oops, something went wrong.