mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Merge pull request #1472 from TobiasPharos/bugfix/1450-hardcoded-template-paths
fix hardcoded template path for "replace_with_published_scene_path"
This commit is contained in:
commit
3edc31990f
1 changed files with 16 additions and 1 deletions
|
|
@ -812,7 +812,22 @@ def replace_with_published_scene_path(instance, replace_in_path=True):
|
|||
template_data["comment"] = None
|
||||
|
||||
anatomy = instance.context.data["anatomy"]
|
||||
template = anatomy.get_template_item("publish", "default", "path")
|
||||
project_name = anatomy.project_name
|
||||
task_name = task_type = None
|
||||
task_entity = instance.data.get("taskEntity")
|
||||
if task_entity:
|
||||
task_name = task_entity["name"]
|
||||
task_type = task_entity["taskType"]
|
||||
project_settings = instance.context.data["project_settings"]
|
||||
template_name = get_publish_template_name(
|
||||
project_name=project_name,
|
||||
host_name=instance.context.data["hostName"],
|
||||
product_type=workfile_instance.data["productType"],
|
||||
task_name=task_name,
|
||||
task_type=task_type,
|
||||
project_settings=project_settings,
|
||||
)
|
||||
template = anatomy.get_template_item("publish", template_name, "path")
|
||||
template_filled = template.format_strict(template_data)
|
||||
file_path = os.path.normpath(template_filled)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue