mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #3742 from maxpareschi/3.14.1-22dogs.1
enhancement/workfile template also matches against os.environ
This commit is contained in:
commit
ce3d0094a3
1 changed files with 6 additions and 1 deletions
|
|
@ -419,9 +419,14 @@ def get_custom_workfile_template(
|
|||
# when path is available try to format it in case
|
||||
# there are some anatomy template strings
|
||||
if matching_item:
|
||||
# extend anatomy context with os.environ to
|
||||
# also allow formatting against env
|
||||
full_context_data = os.environ.copy()
|
||||
full_context_data.update(anatomy_context_data)
|
||||
|
||||
template = matching_item["path"][platform.system().lower()]
|
||||
return StringTemplate.format_strict_template(
|
||||
template, anatomy_context_data
|
||||
template, full_context_data
|
||||
).normalized()
|
||||
|
||||
return None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue