mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Add options to Houdini shelves manager settings
This commit is contained in:
parent
dd070c6fcc
commit
f330f87993
2 changed files with 85 additions and 67 deletions
|
|
@ -5,78 +5,85 @@
|
|||
"is_group": true,
|
||||
"use_label_wrap": true,
|
||||
"object_type": {
|
||||
"type": "dict",
|
||||
"children": [
|
||||
"type": "dict-conditional",
|
||||
"enum_key": "options",
|
||||
"enum_label": "Options",
|
||||
"enum_children": [
|
||||
{
|
||||
"type": "label",
|
||||
"label": "Option 1: Add a .shelf file"
|
||||
|
||||
"key": "add_shelf_file",
|
||||
"label": "Add a .shelf file",
|
||||
"children": [
|
||||
{
|
||||
"type": "path",
|
||||
"key": "shelf_set_source_path",
|
||||
"label": "Shelf Set Path",
|
||||
"multipath": false,
|
||||
"multiplatform": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "path",
|
||||
"key": "shelf_set_source_path",
|
||||
"label": "Shelf Set Path",
|
||||
"multipath": false,
|
||||
"multiplatform": true
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"label": "<strong>OR</strong> Option 2: Add Shelf Set Name and Shelves Definitions"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"key": "shelf_set_name",
|
||||
"label": "Shelf Set Name"
|
||||
},
|
||||
{
|
||||
"type": "list",
|
||||
"key": "shelf_definition",
|
||||
"label": "Shelves Definitions",
|
||||
"use_label_wrap": true,
|
||||
"object_type": {
|
||||
"type": "dict",
|
||||
"children": [
|
||||
{
|
||||
"type": "text",
|
||||
"key": "shelf_name",
|
||||
"label": "Shelf Name"
|
||||
},
|
||||
{
|
||||
"type": "list",
|
||||
"key": "tools_list",
|
||||
"label": "Tools",
|
||||
"use_label_wrap": true,
|
||||
"object_type": {
|
||||
"type": "dict",
|
||||
"children": [
|
||||
{
|
||||
"type": "label",
|
||||
"label": "Name and Script Path are mandatory."
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"key": "label",
|
||||
"label": "Name"
|
||||
},
|
||||
{
|
||||
"type": "path",
|
||||
"key": "script",
|
||||
"label": "Script"
|
||||
},
|
||||
{
|
||||
"type": "path",
|
||||
"key": "icon",
|
||||
"label": "Icon"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"key": "help",
|
||||
"label": "Help"
|
||||
"key": "add_set_and_definitions",
|
||||
"label": "Add Shelf Set Name and Shelves Definitions",
|
||||
"children": [
|
||||
{
|
||||
"type": "text",
|
||||
"key": "shelf_set_name",
|
||||
"label": "Shelf Set Name"
|
||||
},
|
||||
{
|
||||
"type": "list",
|
||||
"key": "shelf_definition",
|
||||
"label": "Shelves Definitions",
|
||||
"use_label_wrap": true,
|
||||
"object_type": {
|
||||
"type": "dict",
|
||||
"children": [
|
||||
{
|
||||
"type": "text",
|
||||
"key": "shelf_name",
|
||||
"label": "Shelf Name"
|
||||
},
|
||||
{
|
||||
"type": "list",
|
||||
"key": "tools_list",
|
||||
"label": "Tools",
|
||||
"use_label_wrap": true,
|
||||
"object_type": {
|
||||
"type": "dict",
|
||||
"children": [
|
||||
{
|
||||
"type": "label",
|
||||
"label": "Name and Script Path are mandatory."
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"key": "label",
|
||||
"label": "Name"
|
||||
},
|
||||
{
|
||||
"type": "path",
|
||||
"key": "script",
|
||||
"label": "Script"
|
||||
},
|
||||
{
|
||||
"type": "path",
|
||||
"key": "icon",
|
||||
"label": "Icon"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"key": "help",
|
||||
"label": "Help"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,9 +21,20 @@ class ShelfDefinitionModel(BaseSettingsModel):
|
|||
title="Shelf Tools"
|
||||
)
|
||||
|
||||
def shelves_enum_options():
|
||||
return [
|
||||
{"value": "add_shelf_file", "label": "Add a .shelf file"},
|
||||
{"value": "add_set_and_definitions", "label": "Add Shelf Set Name and Shelves Definitions"}
|
||||
]
|
||||
|
||||
class ShelvesModel(BaseSettingsModel):
|
||||
_layout = "expanded"
|
||||
options: str = Field(
|
||||
title="Options",
|
||||
description="Switch between shelves manager options",
|
||||
enum_resolver=shelves_enum_options,
|
||||
conditionalEnum=True
|
||||
)
|
||||
shelf_set_source_path: MultiplatformPathModel = Field(
|
||||
default_factory=MultiplatformPathModel,
|
||||
title="Shelf Set Path",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue