Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
move hierarchy key fill under 'newAssetPublishing' condition
Browse files Browse the repository at this point in the history
  • Loading branch information
iLLiCiTiT committed Dec 12, 2023
1 parent 232c0b5 commit 476921c
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions openpype/plugins/publish/collect_resources_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,23 +79,18 @@ def process(self, instance):
"representation": "TEMP"
})

# For the first time publish
if instance.data.get("hierarchy"):
template_data.update({
"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
}
if instance.data.get("newAssetPublishing"):
if "hierarchy" not in instance.data:
template_data["hierarchy"] = instance.data["hierarchy"]

if "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:
Expand Down

0 comments on commit 476921c

Please sign in to comment.