mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
use project anatomy if needed
This commit is contained in:
parent
f56658737a
commit
f99d9d3d77
1 changed files with 4 additions and 2 deletions
|
|
@ -90,7 +90,6 @@ class TemplateResolver(ThumbnailResolver):
|
||||||
|
|
||||||
project_name = self.dbcon.active_project()
|
project_name = self.dbcon.active_project()
|
||||||
project = get_project(project_name, fields=["name", "data.code"])
|
project = get_project(project_name, fields=["name", "data.code"])
|
||||||
anatomy = Anatomy(project_name)
|
|
||||||
|
|
||||||
template_data = copy.deepcopy(
|
template_data = copy.deepcopy(
|
||||||
thumbnail_entity["data"].get("template_data") or {}
|
thumbnail_entity["data"].get("template_data") or {}
|
||||||
|
|
@ -103,8 +102,11 @@ class TemplateResolver(ThumbnailResolver):
|
||||||
"name": project["name"],
|
"name": project["name"],
|
||||||
"code": project["data"].get("code")
|
"code": project["data"].get("code")
|
||||||
},
|
},
|
||||||
"root": anatomy.roots
|
|
||||||
})
|
})
|
||||||
|
# Add anatomy roots if is in template
|
||||||
|
if "{root" in template:
|
||||||
|
anatomy = Anatomy(project_name)
|
||||||
|
template_data["root"] = anatomy.roots
|
||||||
|
|
||||||
try:
|
try:
|
||||||
filepath = os.path.normpath(template.format(**template_data))
|
filepath = os.path.normpath(template.format(**template_data))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue