mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
Merge branch 'develop' into tests/houdini_rops-self-publish-button
This commit is contained in:
commit
2633d5694a
25 changed files with 502 additions and 120 deletions
|
|
@ -2,13 +2,49 @@ from pydantic import Field
|
|||
from ayon_server.settings import BaseSettingsModel
|
||||
|
||||
|
||||
class HoudiniVarModel(BaseSettingsModel):
|
||||
_layout = "expanded"
|
||||
var: str = Field("", title="Var")
|
||||
value: str = Field("", title="Value")
|
||||
is_directory: bool = Field(False, title="Treat as directory")
|
||||
|
||||
|
||||
class UpdateHoudiniVarcontextModel(BaseSettingsModel):
|
||||
"""Sync vars with context changes.
|
||||
|
||||
If a value is treated as a directory on update
|
||||
it will be ensured the folder exists.
|
||||
"""
|
||||
|
||||
enabled: bool = Field(title="Enabled")
|
||||
# TODO this was dynamic dictionary '{var: path}'
|
||||
houdini_vars: list[HoudiniVarModel] = Field(
|
||||
default_factory=list,
|
||||
title="Houdini Vars"
|
||||
)
|
||||
|
||||
|
||||
class GeneralSettingsModel(BaseSettingsModel):
|
||||
add_self_publish_button: bool = Field(
|
||||
False,
|
||||
title="Add Self Publish Button"
|
||||
)
|
||||
update_houdini_var_context: UpdateHoudiniVarcontextModel = Field(
|
||||
default_factory=UpdateHoudiniVarcontextModel,
|
||||
title="Update Houdini Vars on context change"
|
||||
)
|
||||
|
||||
|
||||
DEFAULT_GENERAL_SETTINGS = {
|
||||
"add_self_publish_button": False
|
||||
"add_self_publish_button": False,
|
||||
"update_houdini_var_context": {
|
||||
"enabled": True,
|
||||
"houdini_vars": [
|
||||
{
|
||||
"var": "JOB",
|
||||
"value": "{root[work]}/{project[name]}/{hierarchy}/{asset}/work/{task[name]}", # noqa
|
||||
"is_directory": True
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ from ayon_server.settings import (
|
|||
MultiplatformPathModel,
|
||||
MultiplatformPathListModel,
|
||||
)
|
||||
|
||||
from .general import (
|
||||
GeneralSettingsModel,
|
||||
DEFAULT_GENERAL_SETTINGS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue