mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
79 lines
1.6 KiB
Python
79 lines
1.6 KiB
Python
import copy
|
|
import collections
|
|
|
|
from .lib import (
|
|
WRAPPER_TYPES,
|
|
OverrideState,
|
|
NOT_SET
|
|
)
|
|
from openpype.settings.constants import (
|
|
METADATA_KEYS,
|
|
M_OVERRIDEN_KEY,
|
|
KEY_REGEX
|
|
)
|
|
from . import (
|
|
BaseItemEntity,
|
|
ItemEntity,
|
|
BoolEntity,
|
|
GUIEntity
|
|
)
|
|
from .exceptions import (
|
|
SchemaDuplicatedKeys,
|
|
EntitySchemaError,
|
|
InvalidKeySymbols
|
|
)
|
|
|
|
|
|
example_schema = {
|
|
"type": "dict-conditional",
|
|
"key": "KEY",
|
|
"label": "LABEL",
|
|
"enum_key": "type",
|
|
"enum_label": "label",
|
|
"enum_children": [
|
|
{
|
|
"key": "action",
|
|
"label": "Action",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"key": "key",
|
|
"label": "Key"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"key": "label",
|
|
"label": "Label"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"key": "command",
|
|
"label": "Comand"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"key": "menu",
|
|
"label": "Menu",
|
|
"children": [
|
|
{
|
|
"type": "list",
|
|
"object_type": "text"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"key": "separator",
|
|
"label": "Separator"
|
|
}
|
|
]
|
|
}
|
|
|
|
|
|
class DictConditionalEntity(ItemEntity):
|
|
schema_types = ["dict-conditional"]
|
|
_default_label_wrap = {
|
|
"use_label_wrap": False,
|
|
"collapsible": False,
|
|
"collapsed": True
|
|
}
|