mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
* copied addons from 'ayon-addon-settings' * added AE, photoshop and harmony addon * moved openpype to subfolder * cleanup repository files * updated create package script and README.md * formatting fixes * added cli flags to be able keep server structure * print progress and output dir * another formatting fixes
48 lines
1.2 KiB
Python
48 lines
1.2 KiB
Python
from pydantic import Field, validator
|
|
|
|
from ayon_server.settings import BaseSettingsModel, ensure_unique_names
|
|
|
|
from .publish_plugins import (
|
|
PublishPluginsModel,
|
|
DEFAULT_DEADLINE_PLUGINS_SETTINGS
|
|
)
|
|
|
|
|
|
class ServerListSubmodel(BaseSettingsModel):
|
|
_layout = "compact"
|
|
name: str = Field(title="Name")
|
|
value: str = Field(title="Value")
|
|
|
|
|
|
class DeadlineSettings(BaseSettingsModel):
|
|
deadline_urls: list[ServerListSubmodel] = Field(
|
|
default_factory=list,
|
|
title="System Deadline Webservice URLs",
|
|
)
|
|
|
|
deadline_servers: list[str] = Field(
|
|
title="Project deadline servers",
|
|
section="---")
|
|
|
|
publish: PublishPluginsModel = Field(
|
|
default_factory=PublishPluginsModel,
|
|
title="Publish Plugins",
|
|
)
|
|
|
|
@validator("deadline_urls")
|
|
def validate_unique_names(cls, value):
|
|
ensure_unique_names(value)
|
|
return value
|
|
|
|
|
|
DEFAULT_VALUES = {
|
|
"deadline_urls": [
|
|
{
|
|
"name": "default",
|
|
"value": "http://127.0.0.1:8082"
|
|
}
|
|
],
|
|
# TODO: this needs to be dynamic from "deadline_urls"
|
|
"deadline_servers": [],
|
|
"publish": DEFAULT_DEADLINE_PLUGINS_SETTINGS
|
|
}
|