ayon-core/server_addon/nuke/server/settings/dirmap.py
Jakub Trllo 3ea4c29d0f use 'SettingsField' from ayon server instead of 'Field' from pydantic
This is preparation for new version of pydantic which will require to customize the field for AYON purposes and raw pydantic Field could not be used.
2024-01-26 12:59:18 +01:00

33 lines
798 B
Python

from ayon_server.settings import BaseSettingsModel, SettingsField
class DirmapPathsSubmodel(BaseSettingsModel):
_layout = "compact"
source_path: list[str] = SettingsField(
default_factory=list,
title="Source Paths"
)
destination_path: list[str] = SettingsField(
default_factory=list,
title="Destination Paths"
)
class DirmapSettings(BaseSettingsModel):
"""Nuke color management project settings."""
_isGroup: bool = True
enabled: bool = SettingsField(title="enabled")
paths: DirmapPathsSubmodel = SettingsField(
default_factory=DirmapPathsSubmodel,
title="Dirmap Paths"
)
DEFAULT_DIRMAP_SETTINGS = {
"enabled": False,
"paths": {
"source_path": [],
"destination_path": []
}
}