mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
update settings names
This commit is contained in:
parent
fdea715fe0
commit
d1395fe409
4 changed files with 16 additions and 16 deletions
|
|
@ -758,12 +758,12 @@ def validate_job_path():
|
|||
"""Validate job path to ensure it matches the settings."""
|
||||
|
||||
project_settings = get_current_project_settings()
|
||||
project_settings = project_settings["houdini"]["general"]["update_job_var_context"]
|
||||
|
||||
if project_settings["houdini"]["general"]["job_path"]["enabled"]:
|
||||
if project_settings["enabled"]:
|
||||
|
||||
# get and resolve job path template
|
||||
job_path_template = \
|
||||
project_settings["houdini"]["general"]["job_path"]["path"]
|
||||
job_path_template = project_settings["job_path"]
|
||||
job_path = StringTemplate.format_template(
|
||||
job_path_template, get_current_context_template_data()
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"general": {
|
||||
"job_path": {
|
||||
"update_job_var_context": {
|
||||
"enabled": true,
|
||||
"path": "{root[work]}/{project[name]}/{hierarchy}/{asset}/work/{task[name]}"
|
||||
"job_path": "{root[work]}/{project[name]}/{hierarchy}/{asset}/work/{task[name]}"
|
||||
}
|
||||
},
|
||||
"imageio": {
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
"type": "dict",
|
||||
"collapsible": true,
|
||||
"checkbox_key": "enabled",
|
||||
"key": "job_path",
|
||||
"label": "JOB Path",
|
||||
"key": "update_job_var_context",
|
||||
"label": "Update $JOB on context change",
|
||||
"children": [
|
||||
{
|
||||
"type": "boolean",
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
},
|
||||
{
|
||||
"type": "text",
|
||||
"key": "path",
|
||||
"label": "Path"
|
||||
"key": "job_path",
|
||||
"label": "JOB Path"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,21 +2,21 @@ from pydantic import Field
|
|||
from ayon_server.settings import BaseSettingsModel
|
||||
|
||||
|
||||
class JobPathModel(BaseSettingsModel):
|
||||
class UpdateJobVarcontextModel(BaseSettingsModel):
|
||||
enabled: bool = Field(title="Enabled")
|
||||
path: str = Field(title="Path")
|
||||
job_path: str = Field(title="JOB Path")
|
||||
|
||||
|
||||
class GeneralSettingsModel(BaseSettingsModel):
|
||||
JobPath: JobPathModel = Field(
|
||||
default_factory=JobPathModel,
|
||||
title="JOB Path"
|
||||
update_job_var_context: UpdateJobVarcontextModel = Field(
|
||||
default_factory=UpdateJobVarcontextModel,
|
||||
title="Update $JOB on context change"
|
||||
)
|
||||
|
||||
|
||||
DEFAULT_GENERAL_SETTINGS = {
|
||||
"JobPath": {
|
||||
"update_job_var_context": {
|
||||
"enabled": True,
|
||||
"path": "{root[work]}/{project[name]}/{hierarchy}/{asset}/work/{task[name]}" # noqa
|
||||
"job_path": "{root[work]}/{project[name]}/{hierarchy}/{asset}/work/{task[name]}" # noqa
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue