ayon-core/server_addon/houdini/server/settings/main.py
Jakub Trllo 2b37b8af48
AYON: Addon settings in OpenPype (#5347)
* 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
2023-07-26 14:08:42 +02:00

79 lines
2 KiB
Python

from pydantic import Field
from ayon_server.settings import (
BaseSettingsModel,
MultiplatformPathModel,
MultiplatformPathListModel,
)
from .imageio import HoudiniImageIOModel
from .publish_plugins import (
PublishPluginsModel,
CreatePluginsModel,
DEFAULT_HOUDINI_PUBLISH_SETTINGS,
DEFAULT_HOUDINI_CREATE_SETTINGS
)
class ShelfToolsModel(BaseSettingsModel):
name: str = Field(title="Name")
help: str = Field(title="Help text")
script: MultiplatformPathModel = Field(
default_factory=MultiplatformPathModel,
title="Script Path "
)
icon: MultiplatformPathModel = Field(
default_factory=MultiplatformPathModel,
title="Icon Path "
)
class ShelfDefinitionModel(BaseSettingsModel):
_layout = "expanded"
shelf_name: str = Field(title="Shelf name")
tools_list: list[ShelfToolsModel] = Field(
default_factory=list,
title="Shelf Tools"
)
class ShelvesModel(BaseSettingsModel):
_layout = "expanded"
shelf_set_name: str = Field(title="Shelfs set name")
shelf_set_source_path: MultiplatformPathListModel = Field(
default_factory=MultiplatformPathListModel,
title="Shelf Set Path (optional)"
)
shelf_definition: list[ShelfDefinitionModel] = Field(
default_factory=list,
title="Shelf Definitions"
)
class HoudiniSettings(BaseSettingsModel):
imageio: HoudiniImageIOModel = Field(
default_factory=HoudiniImageIOModel,
title="Color Management (ImageIO)"
)
shelves: list[ShelvesModel] = Field(
default_factory=list,
title="Houdini Scripts Shelves",
)
publish: PublishPluginsModel = Field(
default_factory=PublishPluginsModel,
title="Publish Plugins",
)
create: CreatePluginsModel = Field(
default_factory=CreatePluginsModel,
title="Creator Plugins",
)
DEFAULT_VALUES = {
"shelves": [],
"create": DEFAULT_HOUDINI_CREATE_SETTINGS,
"publish": DEFAULT_HOUDINI_PUBLISH_SETTINGS
}