mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
update labels and add settings tips
This commit is contained in:
parent
2af978342d
commit
82b2bd4b45
5 changed files with 16 additions and 6 deletions
|
|
@ -789,7 +789,7 @@ def update_houdini_vars_context():
|
||||||
template_data
|
template_data
|
||||||
)
|
)
|
||||||
|
|
||||||
if item["is_dir_path"]:
|
if item["is_directory"]:
|
||||||
item_value = item_value.replace("\\", "/")
|
item_value = item_value.replace("\\", "/")
|
||||||
try:
|
try:
|
||||||
os.makedirs(item_value)
|
os.makedirs(item_value)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
{
|
{
|
||||||
"var": "JOB",
|
"var": "JOB",
|
||||||
"value": "{root[work]}/{project[name]}/{hierarchy}/{asset}/work/{task[name]}",
|
"value": "{root[work]}/{project[name]}/{hierarchy}/{asset}/work/{task[name]}",
|
||||||
"is_dir_path": true
|
"is_directory": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,10 @@
|
||||||
"key": "enabled",
|
"key": "enabled",
|
||||||
"label": "Enabled"
|
"label": "Enabled"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "label",
|
||||||
|
"label": "Houdini Vars.<br>If a value is treated as a directory on update it will be ensured the folder exists"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "list",
|
"type": "list",
|
||||||
"key": "houdini_vars",
|
"key": "houdini_vars",
|
||||||
|
|
@ -37,8 +41,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"key": "is_dir_path",
|
"key": "is_directory",
|
||||||
"label": "is Dir Path"
|
"label": "Treat as directory"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,16 @@ class HoudiniVarModel(BaseSettingsModel):
|
||||||
_layout = "expanded"
|
_layout = "expanded"
|
||||||
var: str = Field("", title="Var")
|
var: str = Field("", title="Var")
|
||||||
value: str = Field("", title="Value")
|
value: str = Field("", title="Value")
|
||||||
is_dir_path: bool = Field(False, title="is Dir Path")
|
is_directory: bool = Field(False, title="Treat as directory")
|
||||||
|
|
||||||
|
|
||||||
class UpdateHoudiniVarcontextModel(BaseSettingsModel):
|
class UpdateHoudiniVarcontextModel(BaseSettingsModel):
|
||||||
|
"""Houdini Vars Note.
|
||||||
|
|
||||||
|
If a value is treated as a directory on update
|
||||||
|
it will be ensured the folder exists.
|
||||||
|
"""
|
||||||
|
|
||||||
enabled: bool = Field(title="Enabled")
|
enabled: bool = Field(title="Enabled")
|
||||||
# TODO this was dynamic dictionary '{var: path}'
|
# TODO this was dynamic dictionary '{var: path}'
|
||||||
houdini_vars: list[HoudiniVarModel] = Field(
|
houdini_vars: list[HoudiniVarModel] = Field(
|
||||||
|
|
@ -32,7 +38,7 @@ DEFAULT_GENERAL_SETTINGS = {
|
||||||
{
|
{
|
||||||
"var": "JOB",
|
"var": "JOB",
|
||||||
"value": "{root[work]}/{project[name]}/{hierarchy}/{asset}/work/{task[name]}", # noqa
|
"value": "{root[work]}/{project[name]}/{hierarchy}/{asset}/work/{task[name]}", # noqa
|
||||||
"is_dir_path": True
|
"is_directory": True
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 23 KiB |
Loading…
Add table
Add a link
Reference in a new issue