mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
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.
41 lines
909 B
Python
41 lines
909 B
Python
from ayon_server.settings import BaseSettingsModel, SettingsField
|
|
|
|
|
|
class MenuShortcut(BaseSettingsModel):
|
|
"""Nuke general project settings."""
|
|
|
|
create: str = SettingsField(
|
|
title="Create..."
|
|
)
|
|
publish: str = SettingsField(
|
|
title="Publish..."
|
|
)
|
|
load: str = SettingsField(
|
|
title="Load..."
|
|
)
|
|
manage: str = SettingsField(
|
|
title="Manage..."
|
|
)
|
|
build_workfile: str = SettingsField(
|
|
title="Build Workfile..."
|
|
)
|
|
|
|
|
|
class GeneralSettings(BaseSettingsModel):
|
|
"""Nuke general project settings."""
|
|
|
|
menu: MenuShortcut = SettingsField(
|
|
default_factory=MenuShortcut,
|
|
title="Menu Shortcuts",
|
|
)
|
|
|
|
|
|
DEFAULT_GENERAL_SETTINGS = {
|
|
"menu": {
|
|
"create": "ctrl+alt+c",
|
|
"publish": "ctrl+alt+p",
|
|
"load": "ctrl+alt+l",
|
|
"manage": "ctrl+alt+m",
|
|
"build_workfile": "ctrl+alt+b"
|
|
}
|
|
}
|