align houdini shelves manager in OP and Ayon

This commit is contained in:
Mustafa-Zarkash 2023-10-18 11:39:31 +03:00
parent 873c263587
commit 211d64c3de
2 changed files with 14 additions and 17 deletions

View file

@ -40,6 +40,10 @@
"object_type": {
"type": "dict",
"children": [
{
"type": "label",
"label": "Name and Script Path are mandatory."
},
{
"type": "text",
"key": "label",
@ -68,4 +72,4 @@
}
]
}
}
}

View file

@ -1,23 +1,16 @@
from pydantic import Field
from ayon_server.settings import (
BaseSettingsModel,
MultiplatformPathModel,
MultiplatformPathListModel,
MultiplatformPathModel
)
class ShelfToolsModel(BaseSettingsModel):
name: str = Field(title="Name")
help: str = Field(title="Help text")
# TODO: The following settings are not compatible with OP
script: MultiplatformPathModel = Field(
default_factory=MultiplatformPathModel,
title="Script Path "
)
icon: MultiplatformPathModel = Field(
default_factory=MultiplatformPathModel,
title="Icon Path "
)
"""Name and Script Path are mandatory."""
label: str = Field(title="Name")
script: str = Field(title="Script Path")
icon: str = Field( "", title="Icon Path")
help: str = Field("", title="Help text")
class ShelfDefinitionModel(BaseSettingsModel):
@ -31,10 +24,10 @@ class ShelfDefinitionModel(BaseSettingsModel):
class ShelvesModel(BaseSettingsModel):
_layout = "expanded"
shelf_set_name: str = Field(title="Shelfs set name")
shelf_set_name: str = Field("", title="Shelfs set name")
shelf_set_source_path: MultiplatformPathListModel = Field(
default_factory=MultiplatformPathListModel,
shelf_set_source_path: MultiplatformPathModel = Field(
default_factory=MultiplatformPathModel,
title="Shelf Set Path (optional)"
)