mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +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 = get_project(project_name, fields=["name", "data.code"])
|
||||
anatomy = Anatomy(project_name)
|
||||
|
||||
template_data = copy.deepcopy(
|
||||
thumbnail_entity["data"].get("template_data") or {}
|
||||
|
|
@ -103,8 +102,11 @@ class TemplateResolver(ThumbnailResolver):
|
|||
"name": project["name"],
|
||||
"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:
|
||||
filepath = os.path.normpath(template.format(**template_data))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue