mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
fill template data for editorial
This commit is contained in:
parent
8a3a318480
commit
ac49ab3803
1 changed files with 12 additions and 1 deletions
|
|
@ -68,7 +68,6 @@ class CollectResourcesPath(pyblish.api.InstancePlugin):
|
|||
]
|
||||
|
||||
def process(self, instance):
|
||||
|
||||
anatomy = instance.context.data["anatomy"]
|
||||
|
||||
template_data = copy.deepcopy(instance.data["anatomyData"])
|
||||
|
|
@ -86,6 +85,18 @@ class CollectResourcesPath(pyblish.api.InstancePlugin):
|
|||
"hierarchy": instance.data["hierarchy"]
|
||||
})
|
||||
|
||||
# Add fill keys for editorial publishing creating new entity
|
||||
# TODO handle in editorial plugin
|
||||
if (
|
||||
instance.data.get("newAssetPublishing")
|
||||
and "asset" not in template_data
|
||||
):
|
||||
asset_name = instance.data["asset"].split("/")[-1]
|
||||
template_data["asset"] = asset_name
|
||||
template_data["folder"] = {
|
||||
"name": asset_name
|
||||
}
|
||||
|
||||
publish_templates = anatomy.templates_obj["publish"]
|
||||
if "folder" in publish_templates:
|
||||
publish_folder = publish_templates["folder"].format_strict(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue